Costa, the 25-year-old Atletico Madrid forward was named in the starting line-up by Spain for their Group B opener against Netherlands.
It was a repeat of 2010 World Cup final and when Costa got his first touch of the ball, expectedly, the home crowd booed him. Costa was again booed when he was substituted for Fernando Torres in the 62nd minute.
Costa had won two caps for his homeland Brazil before switching allegiance to Spain. He made his Spanish international debut in March this year.
Brazil coach Luiz Felipe Scolari was last year unhappy with Costa's move to Spain and had dropped him from the squad for friendlies.
"A Brazilian player who rejects the chance to wear the Brazil shirt and play at a World Cup in his country can only be automatically withdrawn from the squad. He's turning his back on something millions dream of doing: playing for the five-time world champions at a World Cup in Brazil," Scolari had said in October, 2013.
"I am Brazilian and that is not going to change but I want to win the World Cup"
"Costa earned his first international call-up for Brazil in March 2013, featuring in two friendlies. However, after being granted Spanish citizenship in July that year, he decided to switch allegiances and represent La Roja, who were lured by his directness and goal-scoring ability. An untimely injury delayed his eagerly awaited second international debut until March 2014," according to the player's profile page on the official website of FIFA.
Last year, Costa made a choice of Spain over Brazil in his bid to win the World Cup.
"I am Brazilian and that is not going to change but I want to win the World Cup with Spain," he was quoted as saying.
Many Brazil-born players have opted to ply thei trade elsewhere and Costa is one of them. He is one of the top strikers in the world at the moment and his dream of winning a World Cup medal might come true in his homeland. But Brazilians will certainly not forget this 'traitor'.
According to media reports, some fans chanted 'traitor, traitor' during Spain's training session in Curitiba. Costa is set to move to Chelsea after the World Cup.
At the moment, the Spanish number 19 will have to deal with hostile reception from the Brazilians for the next one month at the World Cup.