A spokesperson for the airline said the incident was caused by a "disruptive passenger" who was later arrested.
“MH128 departed Melbourne Airport at 11.11pm (1.11pm BST) local time...but made a turn back to Melbourne after the operating captain was alerted by cabin crew to a passenger attempting to enter the cockpit,” a statement said, adding that the plane added safely around half an hour after take-off.
"Following the incident on MH128, the disruptive passenger has been apprehended by airport security," a spokesperson added.
"Malaysia Airlines, together with the Australian authorities, will be investigating the incident. At the moment, the airline does not wish to make any premature conclusions until a full investigation has been concluded."
Malaysia's deputy transport minister, Abdul Aziz Kaprawi, said the passenger claimed to have a bomb.
"It was not a bomb but a powerbank," he added, saying the Sri Lankan national appeared to be drunk.
A woman named Vanessa told the 3AW programme her boyfriend had confronted the passenger as he tried to enter the cockpit.
“He was the one who first confronted him when an air hostess was getting scared of this guy and that's when the guy said 'I'm going to blow up this plane',” she said.
Passengers told relatives they helped the crew "tie the man down" as the plane returned to Melbourne.
Photos posted online by those on board showed the man lying face-down in plastic cuffs, being restrained by passengers and staff.
Armed officers wearing body armour later entered the cabin.
Malaysia Airlines stressed that the aircraft was not "hijacked" at any point, adding that passengers had been safely disembarked.
In pictures: Missing Malaysia Airlines flight MH370
In pictures: Missing Malaysia Airlines flight MH370
1/13 Chinese relatives
A family member of a passenger aboard the missing Malaysia Airlines flight MH370 burns incense as he prays at Yonghegong Lama Temple in Beijing
2/13 Chinese relatives
Family members of passengers aboard the missing Malaysia Airlines flight MH370 burn incense to pray at Yonghegong Lama Temple in Beijing
3/13 Chinese relatives
A family member of a passenger aboard the missing Malaysia Airlines flight MH370 comforts another relative as they gather to pray at Yonghegong Lama Temple in Beijing
4/13 Chinese relatives
Relatives of passengers on missing Malaysia Airlines flight MH370 cry as they gather at the Lama Temple in Beijing. Chinese relatives marked 100 days since the plane went missing on a flight from Kuala Lumpur, Malaysia to Beijing by offering prayers and burning incense at the buddhist temple
5/13 Chinese relatives
Relatives of passengers on missing Malaysia Airlines flight MH370 offer prayers at the Lama Temple in Beijing
6/13 Chinese relatives
A Chinese relative of passengers of Malaysia Airlines flight MH370 prays at the Lama Temple in Beijing
7/13 Chinese relatives
Chinese relatives of passengers of Malaysia Airlines flight MH370 hold incense sticks and pray at the Lama Temple in Beijing
8/13 Malaysian relatives
Intan Maizura Othman (34) wife of MH370 fligh attendant Hazrin Hasnan holds placard during an event to remember the 100th day of the missing crews and passengers of Malaysian Airlines plane MH370 in Damansara, Selangor
9/13 Malaysian relatives
A young relative tries to stick paper planes on a board during an event to remember the 100th day of the missing crews and passengers of Malaysian Airlines plane MH370 in Damansara, Selangor
10/13 Malaysian relatives
Pictures of crews and passengers is displayed during an event to remember the 100th day of the missing crews and passengers of Malaysian Airlines plane MH370 in Damansara, Selangor
11/13 Chinese relatives
Chinese police men try to prevent relatives of Chinese passengers onboard the Malaysia Airlines MH370 from marching to the Malaysian embassy from a hotel in Beijing
12/13 Search for flight MH370
Boatswain's Mate, Able Seaman Morgan Macdonald (L) observing markers from a Royal New Zealand Air Force (RNZAF) P3K Orion at sea in the Southern Indian Ocean. An oil slick in the Indian Ocean is not from missing Malaysia Airlines flight MH370, officials said when insisting underwater search efforts would be 'pursued to their completion'
13/13 Search for flight MH370
Craig Turner from Phoenix International monitoring the Artemis' depth and speed as the Autonomous Underwater Vehicle scans the ocean floor for missing Malaysia Airlines flight MH 370 in the southern Indian Ocean
"Safety and security are of the utmost priority to Malaysia Airlines," it added. "The airline wishes to apologise for the inconvenience caused.
"Affected passengers will be accommodated at hotels and will be offered a seat on the next available flight or on other carriers."
The Australian Federal Police confirmed officers had responded to the incident, which left the airport on temporary "lockdown".
All departing and arriving flights were suspended as security operations continued, but operations have resumed.
Malaysia Airlines has been hit by two major disasters, including the loss of MH370 in March 2014, in circumstances that remain unclear, and the shooting down of MH17 over Ukraine months later.
More than 520 people died in the combined disasters, which put the airline at risk of collapse.Reuse content