The holiday originated as Decoration Day in the years after the Civil War. In 1868 General John A. Logan called for a nationwide day of remembrance for those killed in action. May 30 was chosen (because it was not the anniversary of any particular battle) as a day to decorate the graves of war dead with flowers.
Memorial Day, as Decoration Day gradually came to be known, originally honored only those killed in the Civil War, but after WW1 the holiday evolved to honor all war dead. For about one hundred years it was celebrated on May 30. In 1968 Congress passed the Uniform Monday Holiday Act which then established Memorial Day as the last Monday in May in order to create a three-day weekend for federal workers. The change went into effect in 1971.
“All gave some, some gave all.” This quote is widely attributed to Korean War veteran and purple heart recipient Howard William Osterkamp from Dent, Ohio.