It began as Decoration Day in Waterloo, N.Y. on May 5, 1866 when the “first, formal, complete, well-planned, village-wide observance of a day entirely dedicated to honoring the war dead,” by decorating the graves of soldiers who had lost their lives in the Civil War was held.
Memorial Day became a federal holiday in 1888. The purpose of designating it as a legal public holiday was, according to a Congressional report, to allow “Civil War veterans in federal employ to pay their respects to those who gave their lives in the conflict, without losing a day’s pay.” At that time, there were quite a few federal employees who had previously served in the Union Army during the Civil War.
The day wasn’t observed uniformly until 1971; Public Law 90-363 was signed by President Lyndon B. Johnson on June 28, 1968 with the law taking effect on January 1, 1971. By statute, Memorial Day is always the last Monday in May.