"You are at a crossroads," Kelly told more than 200 midshipmen from 37 states and four countries. "Your destiny has not yet been decided and you are free to set some very ambitious goals for yourself."
When Kelly attended the 82-acre campus, he wanted to be the first person to step on Mars, he said.
"I started out as a lousy pilot and ended up commanding a rocket ship into space," Kelly added. "No matter how difficult it gets, don't give up and please set some crazy goals like I did."
The retired Navy captain and 1986 academy graduate received international attention after the January 2011 assassination attempt on his wife. In their best-selling memoir, "Gabby," the couple shared their story of hope and resilience.
Giffords resigned her Arizona seat in January to focus on her rehabilitation.
On Monday, the 219 men and women received bachelor of science degrees, Coast Guard's licenses and reserve or active duty commissions in the armed services. Eleven will go into the Army and three into the Army reserves. Three will enter the U.S. Marine Corps, 16 will become U.S. Navy ensigns, 14 will join the U.S. Coast Guard and two will become second lieutenants in the U.S. Air Force.
"Today you are joining a long line of men and women who devote themselves, in peace and war, to make America strong and prosperous," U. S. Secretary of Transportation Ray LaHood said. "We recognize that a strong Merchant Marine is not a luxury. It is a necessity."