Johto
Ash received a Phanpy egg as a prize in the episode Extreme Pokémon! after he won a race hosted by an old couple who were breeders. It hatched in the episode Hatching a Plan!. It was shown to be a very playful Pokémon.
Phanpy was the youngest Pokémon on Ash's team, though its power made up for his lack of experience. Throughout most of Ash's travels through Johto, Phanpy was rarely used and was the baby on the team. Its only major battle was a match against Pryce's Dewgong in As Cold as Pryce. It lost the match.
Phanpy, however, played a role in Ash's battle against Macy in the Silver Conference in the episode Love, Pokémon Style!. It battled against and defeated Macy's Slugma.
Kanto Battle Frontier
Ash left Phanpy at Professor Oak's lab before traveling to Hoenn, but it returned to his party when Ash took on the Battle Frontier challenge. It had shown signs that it had grown up beyond the young Pokémon seen in Johto.
In Reversing the Charges, Phanpy battled a Team Rocket mecha and evolved into a Donphan in order to take it down. Ash also used Donphan in the match against Pike Queen Lucy and her Seviper. Donphan had become a very strong battler, but still retained its child-like behavior it had when it was a Phanpy.
Donphan returned to Professor Oak's lab when Ash left for Sinnoh.
Sinnoh
Donphan appeared in An Old Family Blend!, alongside Ash's other Pokémon. It was shown training with Ash. In Working on a Right Move!, Ash used Donphan in his battle against Conway in the Lily of the Valley Conference. Donphan was initially called out to battle Conway's Shuckle, and it put up a good fight, utilizing its Rollout attack, before being recalled by Ash. Later in the battle, it was called out to battle Conway's Dusknoir, but ultimately fell to its powerful Shadow Punch.