The European Causeway was sailing from Scotland to Northern Ireland when it lost power off the County Antrim coast.
The Maritime And Coastguard Agency (MCA) said the ferry will have to stay docked until it is reviewed.
The agency also detained the vessel in March after it failed safety checks.
The European Causeway, which can carry up to 410 passengers, left Cairnryan at about 12:00 BST on Tuesday and was due to arrive in Larne at 14:00, but got into trouble at 13:30.
P&O said the incident was caused by a “temporary mechanical issue” that had been resolved.
It returned to port “under its own propulsion, with local tugs on standby, where it will discharge its passengers and cargo as planned,” a spokesperson added.
The MCA said there were no concerns for passengers’ safety at any point.
“When any vessel reports an issue to the MCA, dependent on the nature of the issue, the MCA may undertake an inspection of that vessel.
“We generally follow up all issues reported on passenger vessels to ensure the safety of those onboard the vessel and that any issues are not so serious that they pose a threat to life or the environment.
“In the case of European Causeway we will be following up the incident with an inspection.”
Earlier, P&O announced the cancellation of its 20:00 sailing from Larne to Cairnryan on Tuesday because of a “technical difficulty”.
It advised that passengers could travel on an alternative Stena Line service.
‘Calm on board’
By Grainne Connolly at Larne Port
I was expecting European Causeway passengers to be disgruntled after being stuck for hours at sea.
But many I spoke to as they came off the ferry said the situation remained calm on board.
They praised staff for keeping them informed.
Passenger Tommy Goodwin said it had been “quite nerve-wracking” when the ship suddenly stopped.
“The captain did make a couple of announcements to let us know it was the engines,” he said.
“The crew were very helpful – they had a good grasp on the situation.”
At one point, Mr Goodwin thought passengers were going to be airlifted off the boat.
“There were helicopters out… we thought we were going to have to be rescued if the engines didn’t pick up.”
On Tuesday afternoon, RNLI lifeboats were launched and tugs from Larne nd Belfast were also deployed to guide the ferry back to port.
The Queen Victoria cruise ship, operated by Cunard, had been standing by in case further support was needed, along with a coastguard helicopter from Prestwick, Scotland.
Ship tracking websites earlier showed the vessel’s automatic identification system (AIS) status as set to “Not Under Command”.
That status is reserved for use when a vessel, “through some exceptional circumstance is unable to manoeuvre as required by these rules and is therefore unable to keep out of the way of another vessel”.
Darren Proctor, from the Rail, Maritime and Transport (RMT) union said he was “very angry”.
Speaking on BBC NI’s Evening Extra, he said workers aboard the ferry had told the union they felt unsafe and wanted to get off.
Former Rear Admiral Chris Parry also told the programme an incident on a ferry of this size “shouldn’t be that common”.
“There is normally sufficient redundancy in the machinery and the back-up systems to make sure that this sort of thing doesn’t happen,” he said.
P&O has experienced difficulties in the last few months, having sacked 800 of its workers across the UK without notice.
Last month, a report recorded 31 failures, including an inability to safely deploy lifeboats or life rafts, on the ferry.
The European Causeway was held in Larne by the Maritime and Coastguard Agency (MCA) from 25 March after an inspection raised safety concerns.
Although P&O recruited new staff, the MCA detained the European Causeway saying it was concerned about “failures on crew familiarisation, vessel documentation and crew training”.
The 22-year-old ship was not cleared to sail until April 8 following another examination.
Passenger Jonny Wilson told the BBC News NI he and his family were in the middle of watching Peter Rabbit 2 on board when the power went off.
“The emergency lights go on. Different bits of the ship were dark. Slowly we came to a stop. They put the anchors down and we just sat there,” he said.
They were told at about 13:45 the problem would be resolved in about 10 minutes.A coastguard lifeboat and helicopter came to the assistance of the P&O ferry, while the Queen Victoria cruise ship (background) was also standing by to offer help
“They said initially it was an issue with engines. After that, about 14:15 they said they couldn’t restore power, that they had called the coastguard,” he explained.
Mr Wilson said his children, five-year-old Sophia and two-year-old Aiden, were OK throughout the whole incident, but he said it had been a frustrating experience.
Another passenger told BBC News NI that people “weren’t bothered at first”, but as time went on they started to worry.
“Not panicking but people started to ask questions,” he said.
“Most people were outside on the top deck wondering what was happening because all these tug boats were around us, helicopters were around us, the ship came back.”
Earlier this month, passengers expressed their frustration over the lack of clarity around sailings.
Before passenger routes resumed Louisa Newell had been hoping to sail from Cairnryan to Larne last month to visit her grandmother.
She had not been to Northern Ireland since August 2020 and did not find out her route had been cancelled until she contacted the company on social media.
“We definitely won’t book with them again,” she added.