Mr Steinmeier told reporters that he would take a few weeks off for the procedure and come back to politics in October, news agency DAPD reported.
Steinmeier was foreign minister from 2005 to 2009. He is now the leader of the opposition for the left-leaning Social Democrats.
His wife, Elke Buedenbender, is a judge at an administrative court in Berlin. The couple have a 14-year-old daughter.