The 18-year-old Tomic broke the ninth-ranked American twice to win the second set in 31 minutes. Fish fought off three more break points in the third set before Tomic was converted on his fourth chance to go up 5-4.
The result hurts Fish's chance of qualifying for the season-ending ATP World Tour Finals in London.
Americans Andy Roddick, Ryan Harrison and Alex Bogomolov Jr. advanced. Roddick edged 20-year-old Grigor Dimitrov of Bulgaria 7-6 (3), 7-5. The 19-year-old Harrison beat 11th-seeded Viktor Troicki 6-3, 6-3, while Bogomolov defeated Marcel Granollers of Spain 6-2, 6-3.
Tomic, who lost to Fish in the quarterfinals of the Japan Open last week, is having a breakout season. He reached the quarterfinals of Wimbledon and cracked the top 50 in the rankings this week at No. 49.
"I can't expect much more for myself. I've had a good last six months. I'm playing well here," he said. "I think you just gotta play tennis, have fun. That's what I realized, not to have a lot of pressure."
Roddick came back from a break down in the second set to tie 4-4 when Dimitrov put a backhand into the net after slipping at the end of a 43-stroke rally.
The Bulgarian broke back in the next game, prompting an angry Roddick to slam his racket into his tennis bag during the changeover.
"I don't know that I made a first serve that game, so that was frustrating for me," Roddick said. "I felt like I was returning pretty well and hitting my forehand pretty well. Then all of a sudden, you know, I'm not putting a first serve in the court."
Roddick saved a set point on Dimitrov's serve before breaking his opponent at love to close out the match.
"He's definitely got all the shots," Roddick said. "He should have closed me out in the second set."
Dimitrov finished with 28 winners, nearly twice as many as Roddick, but also had 51 unforced errors.
Almagro, who has won three titles this year, is trying to clinch one of the four remaining spots at the ATP World Tour Finals.
The only other seeded players to fall Tuesday were two Serbs -- 11th-seeded Troicki and ninth-seeded Janko Tipsarevic.
Tipsarevic lost to Feliciano Lopez 7-6 (2), 7-6 (3), his second straight first-round defeat after capturing his first ATP title in Kuala Lumpur last month.
Other winners included Milos Raonic, who came back to defeat Michael Llodra , 6-7 (2), 6-2, 7-6 (5), as well as eighth-seeded Gilles Simon, 12th-seeded Alexandr Dolgopolov and 14th-seeded Jurgen Melzer.