While the MD-11 may have been a great plane in of itself, it has had such a short production life for several reasons. When MD launched the type in 1986, it did so on pre-existing orders and neither Boeing nor Airbus had a new 300-350 seat jetliner available. As a result, MD felt it advantageous to keep its lead by deriving the new jet from the DC-10 which, of course, takes less time than creating a new design. Unfortunately, derivative designs often suffer from the weaknesses of the parent aircraft and hence the MD-11's initial failure to deliver the performance which American in particular desired.
With American's disappointment in the planes came a slowing of sales and, before major enhancements could be installed, Boeing had launched the 777 and Airbus the A330/A340. Both types were all-new and offered significantly upgraded technology, including fly-by-wire and composite components. Significantly, too, especially in the Triple 7's case, was the development of new high-powered engines which single-handedly made trijets obsolescent - why have the extra fuel consumption and noise of 3 engines when 2 could handle the job? Airbus tackled the issue differently by offering the same airframe in 2 versions, namely the mid-range twin A330 and the ultra-long-range quad A340, which enabled airlines to standardise their mid to long-range fleets.
Alas, as a result of all of this the MD-11 became THE casualty and most new orders went to the newer planes, followed by AA and SR selling off their fleets to FedEx. The MD-11 will survive for many years as a freighter and in so doing may well push the DC-10 into early retirement by being quieter and more efficient. Unfortunately, though, this is indeed the end for MD's last widebody.
Hop to it, fly for life!