A grandmother shot a masturbating man on a bicycle after he tried to break into her home, police say.

The woman, who has not been named, was putting out the trash at her Houston home around 5pm Tuesday when the man began following her on his bicycle while touching himself.

She went inside the house but the man climbed off the bike and tried to get in the front door, so she warned him to leave and told him she had a gun.

A Houston grandmother (pictured) shot a man in the chest after he began following her on a bicycle while masturbating before trying to break into her home

When the man refused to leave she fired one shot through the door, striking the man in the chest.

He managed to get back on his bicycle but only pedaled a few meters before collapsing.

Medics rushed him to hospital in critical condition but he is expected to survive.

The woman's 14-year-old granddaughter was inside the home at the time of the shooting but did not witness the incident, the Houston Chronicle reported.

The woman was questioned by homicide detectives but has not been charged. Investigations are underway to see if any of the parties will face charges.

Police say the man was out on bond after he was caught wandering around the same area while naked a week before.