Kieran Milledge, 22, was caught on CCTV attacking his Staffordshire pit bull terrier on a train between Braintree and Witham, Essex, in October.
He was seen abusing the animal in what Chelmsford Magistrates' Court heard was a "continued and brutal attack".
Milledge, of no fixed address (aka homeless), admitted animal cruelty and possession of a bladed weapon.
He was jailed for 21 weeks for the animal cruelty offence and, to be served concurrently, eight weeks for breaching a suspended sentence order and six months for the weapon offense.
The attack on his dog, called Ronnie, happened over a 20 minute period, the court heard.
Milledge hung the dog by its lead and then swung him against the wall of the train before pushing his foot against his pet's face.
During the 20-minute attack, Ronnie appeared to lose consciousness and defecated on the seat. He died three days later, the court was told.
Milledge said he had been so drunk that he could not remember what happened.
Sgt Steven Maguire, of British Transport Police, said: "I welcome today's sentence as it has taken a violent dog abuser off the streets.
"Milledge's cruel beating of his dog was simply inexcusable and I am pleased that he now has an indefinite ban from keeping animals."
(BBC News - Nov 25, 2016)