After a poor showing in the 2021 Portuguese local elections, Melo decided to advance with a candidacy for the CDS party's leadership against the incumbent president Francisco Rodrigues dos Santos.
Although, after the Assembly of the Republic was dissolved due to the inability of the Socialist Government to pass a budget, which meant there were going to be elections soon,[7] Rodrigues dos Santos canceled the 29th Congress in a generally controversial move, which led to many prominent figures leaving the party.
[8] After a defeat in the 2022 legislative election, where for the first time in its history CDS got no seats in parliament, Rodrigues dos Santos resigned as leader and the new congress was set to April.
[11] In the preparation to the 2024 legislative election, Nuno Melo joined Luís Montenegro from the PSD and Gonçalo da Câmara Pereira from the PPM in the Democratic Alliance coalition.
[13] Shortly after, Nuno Melo was appointed as Minister of National Defence in the XXIV Constitutional Government, led by Luís Montenegro.