Cologne, nine points from safety with four games left, signed the 43-year-old Anfang on a three-year deal as he continues his fight to steer second division side Holstein Kiel into the top flight.
“Markus Anfang is a coach who can make his mark on a team, as he has already proven at Kiel,” said Cologne CEO Armin Veh.
The appointment comes a week after Cologne coach Stefan Ruthenbeck, 45, was told his contract, which expires in June, will not be renewed.
German football magazine Kicker claim Cologne paid Kiel less than a million euros to sign their coach.
Anfang meanwhile is unfazed by the prospect of leaving a team on the verge of promotion for one almost sure to go down.
Third-placed Kiel are just four points behind leaders Fortuna Duesseldorf in the second division.
“I’m from Cologne,” said Anfang, a former Schalke midfielder.
“Nobody has to tell me what it means to work with this exceptional club and these fans.
“Which league it is does not matter.
“I am thankful to Holstein Kiel for a wonderful time and for allowing me this chance.”
Download our app and read this and other great stories on the move. Available for Android and iOS.