Alexander Mackey from Plymouth admitted causing unnecessary suffering to a goldfish by swallowing it.
The fish was won in a game last October at the Goose Fair in Tavistock, Devon by one of Mackey's friends, Plymouth Crown Court was told.
A few days later a video was posted on a friend's Facebook account and a complaint was made to the Royal Society for the Prevention of Cruelty (RSPCA).
He was also banned from keeping fish for five years.
More From This Section
The RSPCA commissioned a vet's report which it said confirmed the fish died in his stomach as a result of a lack of oxygen and would have suffered a lot of pain.
The court heard that Mackey had drunk at least eight cans of lager before and during the fair.
Lindi Meyer, representing the RSPCA, said: "The defendant opened his mouth and dropped the fish in, swallowing it whole.
He opened his mouth to prove it was not there.
"He said it did not cross his mind at the time and he would not have done it if he was sober and he was sorry," Meyer was quoted as saying.