After you catch or beat palkia/dialga, it is possible to go back to the three caves on the three lakes. inside each there is a lake Pokemon. Mesprit is at the first lake by twinleaf town. You wont have a chance to catch him when you first go in because he flies off. Now you have to track him down and randomly battle and catch WARNING he flees from battles instantly so have a Pokemon that knows mean look ar has a special ability that prevents escape. It is level 50 and really hard to catch if you don't have a master ball, and don't kill it, or you wont have another chance to get it.
An easier way to track it down is to get the Marking Map app for the poketch. You get it from the poketch president in Jubilife city after you obtain seven badges. He gives you two other apps before this one though, be sure to get them all.
luck
you use meanlook on him so he cant escape and you catch him
palkia, heatran, giratina, uxie, mespirt, azelf, regigigas, cresselia, phinoe, manaphy, darkrai, shaymin, arceus
You can find mespirt in : Dimond Pearl Platinum HeartGold Soulsilver Black 2 White 2 Pokemon Mysterdungeon Darkness/Time/ Sky (Maybe the new Mystery dungeon) (You may be able to catch mespirt in the new games, Pokemon X and Y)
you have to beat the seventh gym leader then go to the spear pillar
I think you have to beat the eliete Four i know mespirt you catch in the wild use your mark map chart thing
you have to kill azlef uzie and mespirt to get all leagendrys
find the spear pillar your rival and professor rowan are there battle the commanders and Cyrus then you see palkia P.S DO NOT USE YOUR MASTER BALL. YEAH DONT USE THE MASTER BALL SAVE IT FOR MESPIRT CUZ IF YOU FAIL WITH ANY TYPE OF POKEBALL ON MESPIRT IT RUNS AWAY
for pearl catch palkia the main boss to pearl an go to the lakes verity valor acuity
they are mespirt, azelf, uxie, and dialga
Dialga, Palkia, Giratina, Uxie, Azlef, and Mespirt
You can find Palkia at the spear pillar. The psychic pokemon Azelf, Uxie, and Mespirt can be found at Lake Acuity, Lake Valor, and Lake Verity. After you unlock the national Pokedex Heatran can be found on Stark Mountain.