A knife-wielding Chinese man who attempted to rob a woman at an ATM in southern China has earned the title of "world's kindest crook" among social media users, after returning his victim all the money he took.

He did so after taking a peek at the balance on her ICBC bank account and seeing that it was empty.

The woman, who was identified only as Ms Li, had made a late-night trip to the ATM in Heyuan in Guangdong province on Feb 16, where she withdrew 2,500 yuan (S$500).

Closed-circuit television footage from the bank shows Ms Li completing her transaction when a man in a black jacket comes up behind her, reportedly wielding a small knife.

Local media reports said that after Ms Li handed over the cash, the man demanded to check the balance on her bank account.

Ms Li told Guangdong television channel TVS1: "At the time, I felt that as long as he did not hurt me, I was willing to give the money to him."

However, after peering over to look at the balance on Ms Li's account and realising that it was zero, the man simply smiled and returned the cash he had taken.

He was then seen casually walking away from the bank, while looking at his mobile phone.

After the footage was shared online, social media users were amused that the man could be so sympathetic to his victim's plight, and called him the kindest robber they have seen.

However, local police quickly traced the man's identity and whereabouts, and arrested him two days later. He remains in custody, according to TVS1.