It had first been expected to sail on Monday but work was not completed in time to remove the giant propeller so the sailing was delayed until 11am on Friday.
The departure was then put back again and it finally left port at around 11pm on Friday.
The £3 billion warship broke down off the Isle of Wight in August after sailing from Portsmouth Naval Base to take part in flight trials and diplomatic visits in the US.
Inspections by divers and engineers found that the Nato flagship’s 33-ton starboard propeller – the same weight as 30 Ford Fiesta cars – had malfunctioned with a coupling holding it in place breaking.
The carrier was taken back to Portsmouth for further examination by engineers from Babcock before the decision was taken for it to travel to Rosyth, Fife, where it was built, to undergo repairs in dry dock.
The giant warship’s departure from Portsmouth Harbour was dependent on the problem being fixed as well as high tides, which occur every 12 hours and 25 minutes.
The Navy has not commented on how long the repairs at Rosyth are expected to take and how long HMS Prince of Wales will be absent from its role as Nato flagship, but it is understood it will be months rather than weeks.
This is an extremely unusual fault and we continue to pursue all repair options
Its sister ship HMS Queen Elizabeth changed its autumn plans to travel to the US to take over some of the planned engagements including hosting the Atlantic Future Forum in New York – a defence conference aimed at strengthening UK and US bonds.
Rear Admiral Steve Moorhouse, director of Force Generation, who is responsible for making sure Royal Navy ships are ready to deploy, previously explained the fault suffered by HMS Prince of Wales.
He said: “Royal Navy divers have inspected the starboard shaft of the ship and the adjacent areas and they have confirmed there is significant damage to the shaft on the propeller and some superficial damage to the rudder but no damage to the rest of the ship.
“Our initial assessment has shown that coupling that joins the final two sections of the shaft has failed.
“This is an extremely unusual fault and we continue to pursue all repair options.”
A Royal Navy spokesman said: “The full extent of the repairs will be known once the ship has entered dry dock.
“We are committed to getting HMS Prince of Wales back on operations, protecting the nation and our allies, as soon as possible.”