The Central American outfit - who famously topped a group including England, Uruguay and Italy at the World Cup four years ago - made short work of Michael O'Neill's side in San Jose as goals from Johan Venegas, Joel Campbell and Francisco Calvo wrapped up a comfortable victory.
Los Ticos had won just one of their previous seven games before today's match, but they will now go into Thursday's contest with England at Elland Road off the back of a convincing win over another home nation.
The hosts hit back immediately, though, and fired their first warning shot through Arsenal attacker Campbell, who ran on to a cutback from Venegas but curled his finish well wide of the target.
It would not be long before the home side did break the deadlock, though, and again it came from a corner as this time Giancarlo Gonzalez flicked the ball on to the back post, where Venegas was waiting to bundle it home from close range.
Venegas almost had a second moments later when his 20-yard effort was well saved by Carson, but the focus soon switched to the opposition goalkeeper as Navas was brought off with more than 10 minutes still remaining in the first half.
Northern Ireland rarely looked like posing the substitute keeper any problems, though, and Costa Rica were inches away from a second themselves when Campbell burst past Aaron Hughes before curling his effort narrowly past the post just before half time.
However, it took just one minute of the second half for Campbell to get his name on the scoresheet when the Arsenal winger benefited from some poor defending, collecting Venegas's cross before firing his finish through Carson, who also should have done better.
Campbell continued to look the most likely for Los Ticos and forced Carson into another smart save in the 53rd minute, and moments later Celso Borges teed up Venegas for another clear chance, only for the opening goalscorer to nod over the bar.
Campbell turned provider for Costa Rica's third goal shortly after the hour mark, delivering a corner which saw Calvo get in front of Gareth McAuley and thump his header past Carson from close range.
The remainder of the second half was disrupted by a slew of substitutions as Costa Rica comfortably saw out the victory, and they nearly added a fourth in the final minute of normal time too, with Campbell volleying just wide after ghosting in unmarked at the back post.
The three-goal winning margin did not flatter the home side, though, and they will now go into Thursday's match against England full of confidence before also taking on Belgium prior to the start of their World Cup campaign.
COSTA RICA (5-4-1): Navas (Moreira 35'); Gamboa (Smith 64'), Acosta, Gonzalez (Waston 73'), Duarte (Calvo 46'), Oviedo; Campbell, Borges (Tejeda 64'), Guzman, Colindres; Venegas (Matarrita 70')
NORTHERN IRELAND (4-1-4-1): Carson (Hazard 73'); Hodson (C McLaughlin 60'), Cathcart (McCulloch 73'), McAuley, Hughes; J Evans; Boyce (McCartan 39'), McNair, C Evans (Thompson 85'), Dallas; Magennis (R McLaughlin 60')