An apparently homeless man kicked off a bus for having no shoes was given a new pair by a kind police officer.

The officer's random act of kindness was caught on video and shared to Facebook by New Jersey resident Kayla Christine Palmer, NBC Philadelphia reports.

In the clip, the cop - who is named as officer Kenya Joiner - is seen standing with the stranger after he handed over a pair of new shoes to the destitute man.

Since 8th November it has been viewed almost 2 million times, liked 21,000 times and shared by over 40,000 people.

“That was nice of you, I want to shake your hand,” Ms Palmer can be heard saying in the video.

“You’re gonna go viral.”

“Oh come on,” the policeman says shyly, as the other man pulls on his new footwear.

“My dad saw the man get kicked off the bus,” Ms Palmer tells NBC. “He didn’t have any shoes on. I came up and he was telling me about it.”

The unknown man, who is reportedly homeless, can be seen putting his new shoes on. Credit: Kayla Christine Palmer/Facebook

Palmer then saw Kenya approach the shoeless man.

“We saw the officer pull back up and we thought he was gonna tell him to leave,” Palmer said. “Instead he came out with a box of shoes.”

Officer Joiner appeared bashful on camera after his kind act. Credit: Kayla Christine Palmer/Facebook

The kindly police officer didn't want any attention for his unprompted act of decency, but Ms Palmer hopes that his compassionate act gets some recognition.

"He needed some recognition," she's reported as saying. "Because you do see some of these negative stories."