Two-year-old giant panda cub Nuan Nuan, the first to be born in Malaysia, is seen inside her enclosure before departing for Chengdu

Malaysia's first locally-born giant panda headed to its homeland China on Tuesday, with officials bidding a sad goodbye to the female cub.

Two-year-old Nuan Nuan, whose name means "warmth", was born in Malaysia's national zoo in August 2015 a year after her parents Feng Yi and Fu Wa arrived in the country on a 10-year loan from China.

In the wild, can only be found in China's mountainous central regions where their favourite food, bamboo, grows in abundance.

But as part of its policy of "panda diplomacy", Beijing loans the animals to countries worldwide as a goodwill gesture.

Its agreement with Malaysia provides that cubs born in captivity must be handed back to China at the age of two.

Nuan Nuan was placed inside a container Tuesday and lifted into a Malaysia Airlines freighter for a four and a half hour flight to the Chinese city of Chengdu—home to a special research base for giant panda breeding.

The cub was seen lying comfortably on its stomach with bamboo shoots and carrots by its side.

She will be released into the forest after a period of acclimatisation, Malaysian Environment Minister Wan Junaidi Tuanku Jaafar told AFP.

"Goodbye Nuan Nuan. Have a good reunion with your kiths and kins you never knew," he said.

Mat Naim Ramli, the director of the Giant Panda Conservation Centre at the zoo, said he had mixed feelings.

"A little bit sad and a little bit happy," he said at Kuala Lumpur airport.

"Sad because the cub is going to China. Happy because Malaysia has contributed towards panda ."

The decision to house the pandas in a special US$7.7 million facility had caused controversy in Malaysia, with environmentalists arguing the money would have been better spent on conservation of local wildlife.

Pandas have a notoriously low reproductive rate and are under pressure from factors such as habitat loss.

There are an estimated 1,864 in the wild, according to the International Union for Conservation, which classes them as "vulnerable."