Andreas Burmester, boss of shipbuilder ThyssenKrupp, flew to Tel Aviv to participate in the signing ceremony.
The deal has been concluded one day after the 50th anniversary of Germany and Israel establishing diplomatic relations.
But weapons exports to Israel remain controversial, as successive German governments have continued to send arms regardless of international criticism of Israeli policy in the Occupied Palestinian Territories.
The four new ships will be used to patrol Israel's economic zone in the Mediterranean, the Israeli defence ministry said, referring to gas fields off the Israeli coast.
Germany will pay for around a third of the cost of the warships, at €115 million.
All of the ships' weapons systems will be produced by Israeli companies, the defence ministry said, with a value of around €163 million.
Defence ministry director-general Dan Harel called the deal an “extraordinarily important agreement” that would “dramatically improve” Israel's ability to defend its gas fields.
News of the deal came on the same day that German President Joachim Gauck welcomed his Israeli counterpart Reuven RIvlin on a state visit.
Rivlin will spend three days in Germany to mark the 50th anniversary of the German-Israeli relationship.