Marray - 31 from Liverpool - served out the match to complete the victory with his Danish partner Nielsen punching away a volley at the net to see the wildcards over the line. They seemed surprised by their own success at the end.
Patrick Hughes and Raymond Tuckey were the last British winners in 1936 with Bobby Wilson and Mike Davies the last finalists in 1960.
They had done it the hard way having also beaten American second seeds and twice champions Bob and Mike Bryan in the semi-finals.
"What a great honour," said Marray. "I just wanted to cherish every moment. Thanks to Freddie. It was meant to be.
"We can't believe it, it's tough to sink in. It's amazing."
Marray had never gone beyond the third round in ten outings in the doubles. He was granted a wildcard alongside Nielsen with the pair astonishingly only playing in their fourth tournament together.
Nielsen - whose grandfather Kurt was runner-up in the Wimbledon men's singles in 1953 and 1955 - plans to focus on his singles career despite the duo being catapulted into the world's top 25 due to their success, but will play at the season-ending ATP finals in London.
Britain could see a Marray and Murray ending long waits for Wimbledon success with Scotland's Andy aiming to become the first British winner of the singles event since Fred Perry in 1936. He faces six-times's champion Roger Federer at 2pm on Sunday afternoon.
Swede Lindstedt and Romanian Tecau have lost the past three finals of the doubles, but must be wondering if they are meant to win it having gone into this match as heavy favourites.
The first two sets were split with Marray and Nielsen breaking back in the ninth game of the second set to level at 1-1 after their opponents had broke in the seventh game of the match to snare the first set.
With rain forcing the roof to be closed at the end of the third set, the next two sets were settled on tie-breaks. Marray and Nielsen eked out the third set 7-5 with Lindstedt and Tecau winning five straight points quite brilliantly after they looked on the brink of defeat trailing 5-2 in the breaker.
With the crowd throwing their weight fully behind Marray, the unfancied duo broke Tecau in the second game of the closing set. Despite enduring some nervy moments, they saw out the match with Marray arguably the best player over the three hours and 20 minutes.
- Related links