The drama unfolded when a resident alerted police after seeing the man break into the apartment at about 2pm.
City Police Chief ACP Jauteh Dikun said the man, who was still inside the apartment when a police team arrived, attempted to flee by running up to the roof of the building where he threatened to jump.
The man, who tested positive for drugs, gave in after realising that he did not convince the police who stood ready to arrest him.
"Preliminary investigations showed that the man, from Lahad Datu, works at a cyber cafe and was believed involved in several break-in cases in the area," Jauteh told a media conference at the Karamunsing Police Station, Thursday.
"His arrest led to the recovery of two stolen motorcycles, several car keys and break-in tools, inside one of the units where he also stayed," he said.
In an unrelated case, four local men, aged between 20 and 29, were brought in to facilitate investigations in connection with a robbery in Lintas on May 22.
Jauteh said the first man was detained in Penampang at about 12.10am on Thursday after several stolen items were found in his possession.
"His detention led to the arrest of two men at the quarters of the railway station in Tanjung Aru, while the fourth was brought in after he was found in Sembulan Lama," he said, adding that a knife and several handphones were also recovered from them.
On May 22, a 49-year-old woman sustained injuries to her chin after she was attacked by two men, believed to be the suspects, near the Open University along Jalan Kepayan here.
It was said that the woman had just withdrawn RM200 from a bank and was walking towards her vehicle when she was approached by a stranger who slashed her on the chin and fled on a waiting motorcycle.
In another case, two local women in their early 20s were detained after they were caught without a licence on a stolen motorcycle at Kg Rampayan in Menggatal at about 1.30pm on Wednesday. Police are seeking the "friend" who they claimed was the owner of the motorcycle.