He was the UKIP candidate in Cambridge at the general election in 2015 and came fifth, with 5.2 per cent of the vote.[5] Afterwards he described UKIP leader Nigel Farage as "snarling, thin-skinned and aggressive".[6]
O'Flynn was the running-mate for Lisa Duffy in the September 2016 UK Independence Party leadership election.[7] He left the UKIP frontbench in July 2017, believing that the party no longer supported his centrist economic policies.[8] He joined the SDP in November 2018. He cited UKIP leader Gerard Batten's appointment of Tommy Robinson (Stephen Yaxley-Lennon) as an adviser as a key reason for his departure from the party. He said of his decision to join the SDP: "like many on the communitarian wing of [UKIP], I have decided to join the resurgent SDP, which campaigned for Brexit during the referendum and espouses broad and moderate pro-nation state political values that I – and I believe many of our voters from 2014 – will be delighted to endorse."[9] In defecting, O'Flynn became the first MEP to sit in the European Parliament for the SDP (though in 1984 Michael Gallagher MEP had joined the original SDP).