The fifth-seeded Italian failed to convert five set points in the first set and then rallied from 3/5 in the second-set tie-break to stay alive in Stuttgart. He struck 15 winners in the third set to advance after two hours and 49 minutes.
With his 13th win of the season, Musetti levelled his ATP head-to-head series with Koepfer at 1-1. The No.30 player in the ATP Rankings also reached the quarterfinals in Stuttgart last year and will aim to go one step further this week when he next plays Alexander Bublik after the third seed defeated the 2023 Next Gen ATP Finals champion Hamad Medjedovic 6-1, 7-6(4).
Bublik, who fired 18 aces against Medjedovic, clinched the biggest title of his career last season on grass at the ATP 500 in Halle.
Defending champion Frances Tiafoe continued his title defence with a 7-5, 7-6(5) win against German Yannick Hanfmann.
Tiafoe, who beat Struff in the title match last year to win his third ATP Tour crown, saved all 11 break points he faced according to Infosys ATP Stats to triumph after one hour and 55 minutes.
The fourth-seeded American holds a modest 13-12 record on the season. He will hope he can rediscover his best level this week on the German lawns, where he next takes on Jack Draper or Marcos Giron.