Carl Barton hit the boy after seeing him playing with a lighter, Portsmouth Crown Court heard.
Barton, 23, who has moved to Haymoor Road in Poole following the assault in Havant in April, told the police he had a conviction for arson and did not want the two-and-a-half-year-old to do something similar.
He pleaded guilty to assault causing actual bodily harm.
Richard Griffiths, defending, said: 'It is, at the end of the day, a single smack, not premeditated, spurred on perhaps by his own experience with fire.'
Jailing him for six months Judge Peter Henry, who was shown photographs of the injury, said: 'I have to say that I have concluded that an immediate custodial sentence, I am afraid, is inevitable.
'The fact is you caused a very nasty injury to a young boy. This must have been a considerable blow which has caused extensive bruising.'
>> Vote in our latest web poll.