The airline will take an 80% share of the UK company by buying the 50% owned by BMI chairman Sir Michael Bishop for £318 million.
The move was welcomed by Virgin Atlantic, who said the deal could allow anBMI alliance between the two companies to rival competitor British Airways.
The deal is expected to be completed by mid-January.
It will give Lufthansa control of more flights from London Heathrow airport than any other airline except British Airways.
Steve Ridgway, chief executive of Virgin Atlantic, paid tribute to Sir Michael – and said the deal would allow BMI and Virgin to combine their networks.
He said: “Michael is one of the legends of UK aviation. He has been a considerable force in championing the cause of the consumer and, along with Virgin Atlantic, has helped to provide much-needed competition to British Airways.
“Now we are about to enter the next phase of BMI’s future and a turning point in aviation.
“Everyone has speculated that it would make sense for Virgin Atlantic and BMI to combine their long-haul and short-haul networks.
“There is now a major opportunity to do that and create a new, strongly viable competitor to BA.”
Earlier this year, Lufthansa took a 45 percent stake in Brussels Airlines, with the option to buy the Belgium airline outright in 2011.
It is also considering buying stakes in Austrian Airways and Italy’s Alitalia.
The news comes after another budget airline fell victim to the aviation industry crisis.
BMI flew 10.6 million passengers last year, and operated 70 aircraft.
Like almost all airlines, BMI has seen its profits hit this year by the continuing high price of aviation fuel.
This has led to a number of carriers seeking closer ties with rivals, such as British Airways plans for a tie-up with American Airlines.
Other airlines have had to cease operations, including Zoom and XL.