Current operator Serco, which has run the service since 1997, was also unsuccessful with Transport for London (TfL) the joint venture between French firm Keolis and Amey Rail coming out on top.
It will take over the running of the lines from December 7 until at least 2021 and there is an option of a further two years.
A consortium of Keolis and Go-Ahead earlier this year won the franchise for the Thameslink contract, which was a blow to Aberdeen's FirstGroup which had operated many of the services there while Stagecoach also missed out after submitting a bid.
Yesterday Stagecoach, which has its headquarters in Perth, said: "We are disappointed not to have won the DLR franchise.
"We submitted a strong, customer-focused bid, which we believe delivered good value to the taxpayer.
"We always look to submit bids we feel are financially and operationally deliverable. As a matter of course, we will seek feedback from TfL on our bid as part of our evaluation of the outcome."
Shares in Stagecoach fell slightly to end down 1.7p, or 0.5 per cent, at 383.5p.
The company still holds the South Western and East Midlands rail franchises in England as well as the West Coast line through the Virgin Rail joint venture.
It remains in the running for the East Coast contract, which has been run by the government since 2009 but will move to private hands early next year, where it has submitted a bid with Virgin.
There Stagecoach is competing against FirstGroup and a Keolis and Eurostar joint bid.
Serco, headed by Rupert Soames, also outlined its disappointment after carrying more than a billion passengers, including at the London Olympics, while running the franchise.
David Stretch, managing director of Serco's transport business, said: "We will continue to provide DLR passengers with the best possible service until the new operator starts."
He said the company is committed to rail and highlighted the winning of the 15-year Caledonian Sleeper services earlier this year.
Serco shares closed down 1p, or 0.28 per cent, at 362p.
Alistair Gordon, chief executive of Keolis UK, said: "As the world's largest operator of light rail networks Keolis looks forward to using our global expertise to enhance one of the capital's iconic public transport networks and we will work closely with all stakeholders to deliver a world-class service both during this franchise and beyond for London."