Mexico, preparing for next weekend's start to the third phase of Concacaf World Cup qualifiers, made it three wins out of three in warm-up matches in the United States having also beaten Wales and Bosnia.
The defeat was Brazil's first in 11 matches after they won their two previous friendlies on tour against Denmark and the U.S.
Dos Santos put the Mexicans in front in the 22nd minute at Cowboys Stadium with a looping shot from the left that surprised goalkeeper Rafael and went in the top far corner.
"Chicharito" Hernandez increased their lead with a penalty just past the half hour after Juan brought down Dos Santos.
Brazil, whose striker Leandro Damiao had a early goal disallowed in a controversial offside decision, had the lion's share of possession but Mexico the better finishing.
"It was a good victory and now comes the best which is the qualifiers," Mexico midfielder Andres Guardado told broadcasters Televisa.
Mexico meet Guyana on Friday and El Salvador four days later in the third phase qualifiers that end in October.
Brazil, who will host the 2014 finals, meet arch-rivals Argentina in a friendly in New Jersey on Saturday.
Argentina went top of the South American qualifying group on Saturday with a 4-0 victory over Ecuador in Buenos Aires and have a bye next weekend.