She will join the Armed Forces at the Palace of Holyroodhouse as they mark her platinum jubilee in Scotland.
There will be a parade and presentation of the key for Edinburgh Castle in the gardens of the palace.
The army, navy and the air force will be represented at the service and a royal salute will take place as the Queen arrives in the gardens.
Lord Lyon, King of Arms, will then present three senior representatives from the services to the Queen.
They will be joined by three cadets, representing each service, who will then parade the key to Edinburgh Castle across the gardens before presenting it to Major General Alastair Bruce of Crionaich, Governor of Edinburgh Castle.
The Major General will then address the Queen.
The act of loyalty and presentation of the key to Edinburgh Castle will mark the 200th anniversary of King George IV’s visit to Scotland in 1822.
On Tuesday afternoon, the Princess Royal will then present honours in an investiture ceremony at the palace.
Among those to be recognised will be James McGoldrick, the assistant general secretary of the United Nations, and Ross McEwan, the chief executive of the Royal Bank of Scotland.