Angus Sutherland, dressed in Clan Armstrong tartan, piped in the Armstrong family with Mist Covered Mountains.
The piper, 22, a native of the Borders and recent Masters graduate from Georgetown University in Washington DC, was asked to play at the event on behalf of the Scottish people by the Scottish Government, given the late astronaut's links to the country.
Mr Sutherland said: "The service was amazing, a really special occasion, and it was a real privilege to be part of it."
Former Nasa astronaut Armstrong died at the age of 82 on August 25 after suffering complications from heart surgery he underwent earlier in the month.
A public memorial service was held yesterday at the Washington National Cathedral in the capital.
Among those who attended were Armstrong's Apollo 11 mission crewmates, Michael Collins and Edwin "Buzz" Aldrin.
Eugene A Cernan, the Apollo 17 mission commander and last man to walk on the Moon and John Glenn, the former senator and first American to orbit the Earth were also there.
Armstrong was born on a farm in Ohio on August 5, 1930, with his descendants hailing from Langholm in Dumfries and Galloway.
Just three years after his moon mission, Armstrong visited Scotland to receive the Freedom of the Burgh of Langholm.
Scotland's First Minister Alex Salmond said: "Neil Armstrong was a modest man who achieved magnificent things.
"He was extremely proud of his Scottish roots and never more so than the day in 1972 when, in the 'Muckle Toon' of Langholm in Dumfriesshire, he accepted the freedom of the town.
"Local people were surprised but delighted when he accepted their invitation and when Mr Armstrong declared that Langholm would from then on be considered his home town.
"Forty years later, the collective memory of that day has not dimmed."
Armstrong, a former Navy flyer and test pilot, is to be buried at sea today at an undisclosed site.
Charles Bolden, the head of the National Aeronautics and Space Administration (Nasa), said although Armstrong had been the first human to step on the moon, it was his courage and grace under pressure that had made him exceptional.
"We are standing on the shoulders of giants as we get ready to take the next steps into space," said Mr Bolden, a former astronaut.
The memorial service included the Navy hymn Eternal Father Strong To Save sung by a white-clad Navy choir and, accompanying herself on the piano, Grammy-winning jazz artist Diana Krall sang the Frank Sinatra standard Fly Me to the Moon.
At the close of the service, Mr Bolden presented Armstrong's wife, Carol, the flag that had flown at half staff over the Nasa Johnson Space Center in Houston, Texas, on the day her husband died.