The man said he knew the 10-year-old boy when he approached him at around 8.10am on December 15, at Field Head Lane in Batley.
The pupil was unharmed and continued to walk to school where he later reported the incident to a teacher.
In another incident, the same man is alleged to have approached the boy after school on December 2, and temporarily blocked his path.
The boy was not physically harmed but was concerned by the man’s behaviour.
Detective Inspector Stephanie Wiseman, of Kirklees Safeguarding Unit, said: “These incidents have understandably caused some concern for the boy involved and his family and we are working closely with them and the wider school community to offer advice and support.
“We would stress that no attempt has been made to harm or abduct the boy in either of these incidents but the child has found the man’s behaviour worrying and it is important that we establish what has happened.
“A key part of this is speaking to the man involved. We would urge him to get in contact with the police to explain his behaviour which he may not have realised the impact of.”
The man is described as being of skinny build and having a blue or green dragon tattoo on his left hand.
Anyone with information should call Kirklees Safeguarding Unit on 101.