The order comes after Annapolis Mayor Gavin Buckley said Monday that Trump had declined his request to lower the flags.
Trump issued a proclamation Tuesday ordering the flags to half-staff through sundown.
MORE: Maryland's Capital Gazette stands tall after shooting tragedy
Four Capital Gazette journalists and a staffer were killed Thursday when a gunman holding a grudge against the publication shot them in the newsroom.
Trump has repeatedly called journalists the "enemy of the people." He said the day after the shooting journalists shouldn't fear being violently attacked while doing their job.
The White House says Trump ordered the flags lowered as soon as he learned of the Annapolis mayor's request.