A 31-year-old man has undergone surgery at Royal Perth Hospital after being struck by an arrow to his leg.

The man was riding his bike along Sturtridge Road in Lockridge around 9.40 last night, when witnesses say they heard an argument on the street.

A Lockridge resident told 9News shortly after a man came knocking on her door calling for help, saying he said he had been shot by a crossbow.

A man was shot in the leg with a crossbow while riding his bike on Sturtridge Road, Lockridge overnight. (9news)

A witness saw the 40 centimetre arrow close to the victim's kneecap as he screamed in pain. (9news)

The witness said she saw the 40 centimetre arrow through his leg, close to his knee cap and that he was screaming in pain.

Police and Paramedics arrived around 10pm and transported the man to hospital where the arrow was removed.