Top seed Federer, playing at the venue where he got his start in the game as a ballboy two decades ago, will Friday face Belgium's David Goffin who he beat for the title in 2014.
After defeating his German friend Kohlschreiber in 98 minutes with 13 aces and two breaks of serve, Federer was happy to escape with the win.
“The support really made the difference for me tonight, especially at the end of the match,” said Federer.
“The fans helped me a lot and probably drove him down a bit — thanks to everyone.
“It's always difficult against Philipp, he's such a tough opponent. I may have beaten him a lot but it's not been easy.
“Today was another battle and I'm just relieved to get to the quarter-finals.”
Federer, with five titles this season, won his 55th match of 2015 against nine losses.
America's Donald Young stunned South African fourth seed Kevin Anderson 6-2, 7-6 (8/6) to reach the quarters.
Young, the world number 49, goes on to face 29th-ranked compatriot Jack Sock who withstood 14 aces from fellow American and sixth seed John Isner's racquet in a 7-6 (7/5), 6-3 win.
Sock earned his second win from six attempts against Isner as the 23-year-old claimed his 34th match of the season.
Seventh-seeded 2014 US Open winner Marin Cilic earned a place in the quarter-finals, beating Russian Teimuraz Gabashvili 6-3, 6-1 but managing just seven aces in the process.
Cilic will face 14-time major winner Rafael Nadal on Friday for a place in the semi-finals.
Serve king Ivo Karlovic enjoyed a 7-6 (7/4), 7-5 win over Serbia's Dusan Lajovic, with the Croatian firing 25 aces just a day after knocking out Swiss second seed Stan Wawrinka with 21.
Anderson, Isner and Karlovic have each delivered more than 1,000 aces in ATP play this season, the first time that mark has been achieved since records began in 1991.
Fifth-seeded Richard Gasquet extended his outside bid for a place in the season-ending World Tour Finals as he beat Dominic Thiem 7-6 (7/1), 6-4.
The Frenchman needs to win the Basel title and next week's Paris Masters to have a chance to claim a place in the eight-man London showpiece. He next faces Karlovic.
“I played a good tiebreaker which was key,” said Gasquet. “I hit some great shots when I needed to. My backhand was working really well and I got confidence from it.
“It was a super match for me and keeps me in the race for London. Karlovic is such a tough opponent. His serve is unbelievable. I just have to concentrate on returns, I will need to play really well.”
With the last two spots in the season wrap-up still in play, the situation was complicated by the pullout in Valencia of David Ferrer.
The 33-year-old Spaniard, who won the Vienna title last weekend, was suffering with an elbow injury, a problem which forced him off court for three months this season.
Ferrer stands joint seventh in the points chase, level with Japan's Kei Nishikori who is also out injured.