The thief wasn't totally good-hearted though -- he kept the cash that was inside the wallet, as well as the man's cellphone.
The robbery was reported at about 10:30 p.m. Thursday in the 1500 block of Grant Avenue, according to police.
The 29-year-old victim was walking up the stairs of the building when a suspect approached from behind and demanded his belongings, police said.
The victim complied, handing over his cellphone and wallet. He then broke into tears, leading the suspect to give him his wallet back while keeping the cash, according to police.
The suspect, a man in his mid to late 30s, then fled and had not been found as of this morning.
The victim was not injured in the robbery.
Anyone with information about the case is encouraged to call the Police Department's anonymous tip line at (415) 575-4444 or send a tip by text message to TIP411.