The total investment earmarked for the projects amounts to €17 billion, the firm said in a statement.
With its Qatari partners, Deutsche Bahn will design and build a metro system for the capital Doha, comprised of four lines with 98 stations and a total length of 300 kilometres.
In addition, a 180-kilometre-long high-speed line to neighbouring Bahrain is envisaged, with trains capable of travelling 350 kilometres per hour.
Deutsche Bahn boss Rüdiger Grube signed the deal in Doha in the presence of Qatari Prime Minister Sheikh Hamad bin Jassim al-Thani, who is also foreign minister, as well as German Transport Minister Peter Ramsauer.
The contract creates a new company called the Qatar Railways Development Company, which will be 49-percent owned by Deutsche Bahn and 51-percent by Qatari Diar, Qatar’s state-owned infrastructure and property development firm.
This development firm will control a planning budget of €700 million.
“We are proud and delighted that the Qatari government has chosen Deutsche Bahn as its partner for this ambitious infrastructure project,” said Grube in a statement.
“Such a project helps us to secure jobs at home at an economically difficult time,” he added.
Ramsauer said the contract demonstrated that German technology, especially in the domain of transportation, was in world-wide demand.
Deutsche Bahn added that it hoped to win more contracts in the Middle East following what it hoped would be a fruitful partnership with Qatar.