Hampton couldn't capitalize on seven break points in the first set. Safarova broke to lead 4-3 in the second set and served for match at 5-4, but the American broke back and even had a set point at 6-5 before sweeping the tiebreaker.
After an exchange of breaks early in the final set, Hampton broke again to lead 5-4.
The 23-year-old Hampton wasn't impressed by her performance in the grass-court warmup for Wimbledon.
"I think that I'm playing good, solid tennis, but I don't think I'm anywhere near my best," she said. "I was a little worked up today, actually, showed a little more emotion than I like. The conditions were tough. We were basically playing in a cloud.
"There was so much moisture in the air, and the court was slick. So I was having a hard time with my footing and my movements. That was definitely bothering me a little bit."
She'll play fifth-seeded Caroline Wozniacki, who rallied past Ekaterina Makarova 4-6, 6-0, 6-3 in a contest between two former champions.
Hampton and Wozniacki will meet for the first time on the WTA tour. Their only previous meeting came in the first round of the U.S. Open junior event in 2005, with Hampton winning 6-2, 2-6, 6-4.
Li Na was less fortunate in the quarterfinals at Eastbourne, falling 7-6 (4), 6-3 to Elena Vesnina.
The players had contrasting paths to the last eight. Vesnina struggled through her first two matches to win both in three sets. Li, the 2011 French Open champion, had played just two sets before receiving a walkover in the second round.
The second-seeded Chinese player rarely looked comfortable. After sharing breaks in the first set, Vesnina took the tiebreaker.
In the second set and after an exchange of breaks, a double-fault gave Vesnina a 5-3 lead and she served out for her third win over Li in four meetings.
"A little bit of surprise, the way she's playing," Li said. "But for me I think sometimes I can play well, but sometimes I think I lose concentration on the court."
Vesnina will face Yanina Wickmayer, who upset sixth-seeded Maria Kirilenko 6-2, 1-6, 7-5.
On the men's side, Feliciano Lopez beat Fernando Verdasco 6-4, 7-6 (6) to reach the final four in a match of Spanish lefthanders.
The match was delayed for 90 minutes by light rain. Just one break of serve at 2-2 decided the opening set. Verdasco was unhappy about the grass-court conditions.
Lopez saved a break point to hold for 2-2 and a second set point at 5-4. He rallied from 4-1 down in the tiebreaker.
"Until last couple of games of the match, the court was not good enough to play, but sometimes on grass you have to play on these conditions," Lopez said. "Sometimes with the grass is difficult ... because you feel that you are not safe. But they tell you to play and you have to play."
In other matches, Gilles Simon beat Bernard Tomic 7-6 (8), 6-3, Andrea Seppi defeated Radek Stepanek 6-4, 6-2, and Ivan Dodig upset eighth-seeded Fabio Fognini 6-3, 6-2.