"And your devotion and dedication makes me truly proud to be your commander in chief", he said.
"Never, never, never give up".
Trump says the 195 graduates at the academy in New London, Connecticut, could have gone to school anywhere and ended up with fewer responsibilities by comparison.
The US president was speaking as he faced calls to be impeached over his handling of the sacking of former Federal Bureau of Investigation director James Comey and his relationship with Russian Federation. Members in the audience, many of whom CNN reported were wearing red "Make America Great Again" hats, cheered and applauded the line. "Don't give in. Never back down", he said. Nothing worth doing ever, ever, ever came easy.
Trump argued that the controversy was something only the media cared about.
"Either they don't understand the damage they're doing to their own country, in which case they are simply stupid, or they understand everything, in which case they are risky and corrupt". Trump said he was elected to serve "the forgotten men and women of our country".
The speech comes at a perilous time for Trump.
"We've saved the second amendment", he said, after touting his work on immigration, job creation and tax reform.
"Now I want to take this opportunity to give you some advice", Trump began.
Amid reports that fired FBI Director James Comey composed memos that detailed Trump's attempts to quash the investigation of disgraced National Security Advisor Michael Flynn, Trump complained to cadets that life is "not always fair", and appeared to describe the current firestorm as undeserved and unwarranted.
Trump said he did not get elected to serve the Washington media or special interests.
The White House has denied the reports.
Hundreds of supporters gathered outside the academy to welcome Trump to the seaside town.
The administration looks to suspend the controversy - even briefly - as Trump, joined by Secretary of Homeland Security John Kelly and the commandant of the Coast Guard will graduate almost 200 soon-to-be ensigns into 226-year-old military service tasked with protecting the nation's borders and maritime installments.
Hundreds of supporters gathered outside the US Coast Guard Academy on Wednesday to welcome Trump to the seaside town. "We are doing a lot of that".