The reticulated python was a whopping 7.5 metres (25 feet) long and weighed a staggering 250 kilogrammes (550 pounds).
The giant creature was discovered on Penang island by construction workers and kept in an office, where it was fed and watered while wildlife experts were contacted.
However, the python died on Sunday after laying an egg, a spokesman for the civil defence department told AFP.
“We are so sad this happened,” he said. “We have rescued many other snakes and animals before. We’re not sure why the snake died.
“We fed it mice, other meats and gave (it) water, just like we gave other snakes in the past.”
Curious locals flocked to the office over the weekend to catch a glimpse of the mighty reptile, with one person offering 10,000 ringgit ($1,300) for it, The Star newspaper reported on its website.
The civil defence spokesman said the snake was certainly one of the longest found in Malaysia.
The longest snake in captivity — also a reticulated python — is a 7.67 metre specimen called Medusa, which lives in the United States, according to the website of Guinness World Records.