Bosnia dominated the first half and could easily have gone to the break with a bigger advantage but, in the end, had goalkeeper Asmir Begovic to thank for two great saves to deny Mexico an equaliser.
Mexico coach Miguel Herrera experimented with his line-up but the performance of his team will have disappointed an overwhelmingly Mexican capacity crowd of 60,707.
Edin Dzeko, whose two goals gave Bosnia a 2-1 win over Ivory Coast on Saturday, was a menace to the Mexican defence from the outset and went close to scoring three times in the opening eight minutes.
After forcing Alfredo Talavera into a save with a low shot in the fourth minute, Dzeko twice fired just over the bar as Bosnia's midfield, prompted by the classy Miralem Pjanic, took control.
Mexico's first real chance came in the 24th minute with Javier Hernandez, given a start in attack, latching on to a fine ball from Miguel Layun and striking the outside of the post with a low shot.
However, Bosnia's deserved lead came, four minutes before the break, when Sejad Salihovic whipped in a ball from the byline and Hajrovic met it with a confident first-time strike.

A series of substitutions disrupted the game in the second half but Mexico began to pile on the pressure in the closing minutes as they sought to defend coach Miguel Herrera's unbeaten record.
Francisco Rodriguez's glancing header from an inswinging free-kick forced a great save out of Begovic and the Bosnia keeper was at full stretch again moments later to push a fierce Miguel Ponce long-range effort around the post.
Mexico, who face hosts Brazil, Cameroon and Croatia in World Cup Group A, will wrap up their preparations with a friendly against Portugal in Foxborough on Friday.
Bosnia, who are featuring in their first World Cup as an independent nation, will now head to Brazil, where they are drawn in Group F with Argentina, Iran and Nigeria.
"This is good for our confidence to beat Ivory Coast and then to beat Mexico in front of their great fans," Manchester City striker Dzeko told ESPN.
"We are prepared well for the World Cup. This is an amazing thing for our team and our small country, we have waited over 20 years for this and we want to do our best to make the second round - and then we will see."
Brazil face Croatia in the opening match of the tournament in Sao Paulo on June 12 with the final taking place in Rio de Janeiro on July 13.


Latest News from Sports News Desk