The Queenstown product paired with Brit Luke Bambridge to be beaten 6-4, 6-4 by world No1 ranked duo Robert Farah and Juan Sebastian Cabal, both of Colombia.
McLachlan and Bambridge had their serve broken once in each set and that proved the difference.
Since making the Wimbledon quarterfinals last year, it was the first time McLachlan had made it past the first round at a grand slam. He and Bambridge netted $144,000 for their efforts.
Meanwhile, New Zealander Michael Venus and Chinese Taipei partner Hao-Ching Chan are through to the mixed doubles final.
They beat Latisha Chan, of China Taipei, and Croatian Ivan Dodig 7-6 (7-3), 7-5 in the semifinals.
They will play Jamie Murray of Britain and American Bethanie Mattek-Sands in the final on Monday. Venus and Chan lost the mixed doubles final in 2017.