The three-year-old is in a serious condition in hospital following the crash yesterday afternoon.
Police Scotland said the boy's father had been driving along Rosevale Road in Dumfries, with his son in the car, at about 3.30pm. He then pulled over and got out of the car to speak to a friend.
During this time, his toddler son took off his seatbelt and stepped out into the road, where he was struck by a red Peugeot.
The boy was taken to Yorkhill Hospital in Glasgow, where his condition is described as serious but stable. The Peugeot driver was not hurt.
Officers from Dumfries road policing unit are urging witnesses or anyone with information to contact them on 101, the police non-emergency number.