During 1970s Merola became a member of the Italian Communist Party, of which Bologna was a solid stronghold. When the PCI was transformed into a social democratic party, the Democratic Party of the Left, Merola joined it. He had been President of Savena district for the PDS from 1995 to 2004, when he was appointed city planning by mayor Sergio Cofferati, a former trade union leader. In 2007 Virginio Merola was one of the founders of the Democratic Party. In 2008 he was candidated to the centre-left primary to become Mayor in 2009 municipal election. The contest was won by University professor and Vice President of Emilia RomagnaFlavio Delbono and Merola arrived third with 21.4% of votes. In 2010 Delbono resigned as mayor after the so-called Cinziagate, when the Mayor was being investigated for embezzlement, fraud and aggravated abuse of office following allegations made by his former lover. Delbono's natural heir as mayor was considered Maurizio Cevenini, a famous local politician who has been a long-time member of the city council; but Cevenini suffered an ischemia on October 2010 and renounced to run as new mayor. After Cevenini's withdrawal Merola run again in the primary election against Amelia Frascaroli, a member of Left Ecology Freedom, and Benedetto Zacchiroli, an LGBT activist member of the PD, and won with 58.4% of votes. In 2011 election he led a centre-left coalition against Manes Bernardini, member of the right-wing regionalist Lega Nord, who led the centre-right coalition. Merola won the election in the first round with 50.47% of votes; he is the latest of a long line of left-wing mayors of Bologna. In September 2014 Merola transcribed, along with other centre-left mayor like Ignazio Marino and Giuliano Pisapia, in the civil register the foreign marriages of same-sex couples, which was opposed by Catholic institutions. After the establishment of metropolitan cities, administrative divisions that included a large core city and the smaller surrounding towns that are closely related to it with regard to economic activities and essential public services, on 1 January 2015 Merola became also Metropolitan Mayor of Bologna. In 2016 he run once again as leader of a centre-left coalition against Lucia Borgonzoni, member of Lega Nord, and Massimo Bugani, the candidate of the Five Star Movement. Merola became the most voted candidate in the first round, but gained only 39.5% of votes and did not succeed in being elected in the first round. On 19 June, he won the second round with 54.64% of votes and remained mayor.