Results of the Bundestag vote showed 355 deputies approved the measure, with 153 against and three abstaining. Nearly 100 MPs did not cast a ballot.
Germany aims to sell a 24.9 percent stake in Deutsche Bahn's passenger and freight operations, while infrastructure such as tracks and railway stations would remain state-owned.
Deutsche Bahn chief Hartmut Mehdorn called it "a good day for passengers, taxpayers and staff."
"Today's decision secures the future of the company and its 237,000 employees," he said in a statement.
"Now we must make the partial privatization a success together in the coming months and strengthen Germany's position as a place to do business."
The government presented the plans to the Bundestag as a motion rather than as a bill, meaning they will not need to go before the Bundesrat upper house, where Germany's 16 states are represented and opposition is stronger.
The privatization of Deutsche Bahn has been on the cards since 1994, when the rail operators of the former West and East Germany merged.
But the plans were delayed by the company's disastrous financial situation following the unification of the country.
The left-right government was sharply divided between Christian Democrats
backing the privatization and Social Democrats raising concerns about potential job cuts at Deutsche Bahn.
They struck a compromise to avoid handing a foreign investor a blocking minority, which German law has set as a 25 percent stake in a company.
Deutsche Bahn and trade unions have also agreed