The mighty 65,000-tonne warship will be leaving her home in Portsmouth later this year to head to Rosyth's enormous dry dock facility.
It comes after the Ministry of Defence awarded a Â£5m maintenance contract to defence firm Babcock to tackle a routine hull survey and carry out maintenance of the Â£3.1bn vessel's underwater systems.
Queen Elizabeth will spend six weeks in Rosyth, the first time she has been back to the dockyard since leaving it in 2017.
And the trip will also be the first time both Queen Elizabeth and her sister ship, HMS Prince of Wales will have been reunited in about 18 months.
A message on Queen Elizabeth's official Twitter account said: '˜Pleased to say we are going back to Scotland for our first planned dry dock maintenance period.
'˜A last chance to meet our sister ship @HMSPWLS before she sets sail and [Great Britain] has both her biggest, most advanced aircraft carriers at sea.'
The work will sustain 100 jobs at its peak and be carried out in the summer.
Defence minister Stuart Andrew said: '˜After a phenomenal year of trials off the east coast of the US, this dry-docking contract is an important step for HMS Queen Elizabeth as she gears up for operations.
'˜The largest ship in our Royal Navy's history, which was assembled in Rosyth, will now return for this multi-million-pound routine maintenance work as she gets set to represent Britain across the world for decades to come.'
HMS Prince of Wales, is currently undergoing the final stages of construction at the Rosyth yard and was powered up for the first time in November.
She is due to be handed over to the Royal Navy later this year.Â
The ship's company is expected to start moving on board imminently.Â
Russell Brown, director ships support at Defence Equipment and Support, said: '˜The teams at Defence Equipment and Support are committed to bringing the national flagships into operational service and this dry docking is a crucial step on that journey.
'˜This significant national enterprise is built upon the excellent relationships across defence and the unparalleled skills within UK industry.'
HMS Queen Elizabeth and HMS Prince of Wales are the largest ships ever built for the Royal Navy.
HMS Queen Elizabeth will resume aviation trials later this year with British-owned F-35s.
She is expected to enter operational service in 2020, prior to her first deployment in 2021.
HMS Prince of Wales is expected to arrive in Portsmouth for the first time later this year after completing her sea trials.