The man had been driving along Rosevale Road, Dumfries, with his son in the car at around 3.30pm on Saturday. He then pulled over and got out of the car to speak to a friend.
However, the toddler took off his seat belt and stepped out into the road, where he was struck by a red Peugeot.
His condition is described as serious but stable in hospital. The Peugeot driver was not hurt.
Officers from Dumfries road policing unit are urging witnesses or anyone with information to contact them on 101.
A spokesman said: "Officers from Road Policing in Dumfries are appealing for information."