Starting from pole, Marquez was beaten to the first turn by Pedrosa but the 20-year-old Spaniard patiently stalked his team-mate around the twisting Circuit of the Americas before grabbing the lead with nine laps remaining in the 21 lap race and pulling away for a comfortable 1.534 second victory.
"Racing MotoGP always it is hard," a beaming Marquez told television reporters following the race. "I chose the hard tire on the rear and was not very sure but in the end was working well.
"I don't know what happen in the front I had many problems, especially at the end of the race I could not push but in the end it was like that and I am very happy."
The inaugural Texas race quickly turned into a two-rider tussle as the factory Hondas pulled away with Marquez and Pedrosa engaging in a thrilling cat-and-mouse battle.
But after Marquez dove inside Pedrosa to take the lead his fellow Spaniard could not respond with Marquez powering away
from the field to replace Freddie Spencer, winner in Belgium in 1982, as the youngest rider to win a premier-class grand prix.
Pedrosa said he was trying to catch up in the second part of the track.
"But three laps from the end I make a mistake, I lose one and a half second and that was it," he shrugged. "Anyway he (Marquez) did a very good race being just his second race he was really strong so congratulations."
Double world champion Jorge Lorenzo, winner of the season opener in Qatar two weeks ago, came home third to complete an all-Spanish podium with round three of the series set for May 5 in Jerez.
Britain's Cal Crutchlow was fourth on his non-works Tech3 Yamaha while Germany's Stefan Bradl brought his LCR Honda across the line in fifth.
Seven-time champion, Italian great Valentino Rossi, back on a Yamaha as Lorenzo's team mate after two years with Ducati, was sixth.
After two of 18 rounds Marquez and Lorenzo top of the rider's standings with 41 points with Pedrosa eight back on 33 and Rossi on 30.
1. Marc Marquez (Spain) Honda 43:42.123
2. Dani Pedrosa (Spain) Honda 43:43.657
3. Jorge Lorenzo (Spain) Yamaha 43:45.504
4. Cal Crutchlow (Britain) Yamaha 43:48.739
5. Stefan Bradl (Germany) Honda 43:54.797
6. Valentino Rossi (Italy) Yamaha 43:58.738s
7. Andrea Dovizioso (Italy) Ducati 444.497
8. Alvaro Bautista (Spain) Honda 44:4.977
9. Nicky Hayden (USA) Ducati 44:15.896
10. Andrea Iannone (Italy) Ducati 44:24.235
11. Aleix Espargaro (Spain) Aspar 44:30.960
12. Bradley Smith (Britain) Yamaha 44:32.828
13. Ben Spies (USA) Ducati 44:56.255
14. Randy De Puniet (France) Aspar 44:57.774
15. Yonny Hernandez (Colombia) Paul Bird Motorsport 45:1.714