The offence happened on a footpath between Lowndes Grove in Shenley Church End and Old Bell Lane in Loughton, Milton Keynes, at 2.45pm on Wednesday.
A man had hold of a boy, but when a member of the public intervened, the offender fled the scene without the victim.
The boy told the member of the public that he did not know the man.
The victim is described as white boy, about ten or eleven-years-old. He was wearing a green t-shirt and black jogging bottoms. He was carrying a dark coloured backpack.
If you know or think you might know who the boy is then please contact Thames Valley Police as soon as possible. The easiest way to contact the force is via our website or by calling 101, quoting investigation reference 43210418501.
We would also be keen to hear from anyone who has information about the offence, especially if you saw a man acting unusually in the area on Wednesday afternoon.
A 38-year-old man from Milton Keynes has been arrested as part of our investigation. He has been released on police bail until 11 October.