Hundreds of people were in the city on Saturday to see the soldiers, whose regiment suffered heavy casualties in a recent tour of Afghanistan.
The regiment was presented with the honour by the Mayor of Wakefield, Coun Tony Wallis and the parade was inspected by the Lord Lieutenant of West Yorkshire, Dr Ingrid Roscoe, who also took the salute.
The Rifles inherited the Freedom of the City following their formation through the amalgamation of The Yorkshire Light Infantry – who inherited the Freedom in 1972 – with three other Infantry Regiments of the British Army in 2007.
Coun Wallis said: "It is an honour to welcome these brave servicemen to the district to award them with their Freedom of the City."
The regiment, based in Edinburgh, recently returned from a very difficult tour of Afghanistan suffering many deaths and casualties.
It came as the MoD confirmed the death of a British soldier who died in hospital in the UK after being shot in Afghanistan. Kingsman Darren Deady, 22, from Bolton, Lancashire, was injured in the Nahr-e Saraj District of Helmand Province on
The soldier, from 2nd Battalion, The Duke of Lancaster's Regiment, part of Combined Force Nahr-e Saraj (South), died at the Queen Elizabeth Hospital, in Birmingham, on Friday.