But while Kelly has worked for the government nearly his whole life, he hasn't always embraced the political arena he is now at the center of.
Kelly had only been retired from the military eight months when Trump tapped him after last November's election to run his Department of Homeland Security, a position that put Kelly in charge of the administration's policies on issues including immigration, cybersecurity, countering domestic terrorism and aviation security.
A Marine, Kelly served in the military for nearly five decades and served in positions including chief of Southern Command, senior assistant to the secretary of defense and legislative liaison to Congress, and he served tours in Iraq and Afghanistan.
Kelly was born and raised in Boston and graduated from the University of Massachusetts. Kelly's son, Robert Michael Kelly, was killed in combat in Afghanistan in 2010.
In a June interview with CNN, Kelly said that call from Trump's transition team about joining the administration came out of the blue, and he turned to his wife to get her thoughts.
"True to form, my wife Karen said, 'Well, if the Kelly family is nothing else, we're a family of service to the nation. And if they think they need you, then you've got to do it,'" Kelly recounted.
Many Democrats joined Senate Republicans in confirming him to the position on an overwhelming basis, with 88 votes in favor.
Kelly's friends and former colleagues describe him as a consummate Marine -- loyal to his commander, his mission and his troops.
He has made defending the men and women of DHS his mission since coming into office, at times sparring with members of Congress who have questioned whether immigration officers have been overzealous in their jobs. He has made praising the workforce a focus of many of his public speaking engagements, and often answers critical questions about administration policies by proclaiming his obligation to follow the law.
Adjusting to political life
Kelly served as a liaison to former Defense Secretary Leon Panetta, and he worked as a legislative assistant for the Marine Corps commandant in the mid 2000s. But says he was not prepared to become the political lightning rod that his new position has made him.
"What I never saw on the military side was the level of toxic kind of politics that are associated with what I do now," Kelly acknowledged in the June interview, repeating what he frequently tells members of Congress who criticize his actions: If you don't like the laws, try to change them.
Panetta suspects Kelly is particularly uncomfortable when it comes to "schmoozing" politicians, which is a key part of the job.
"He's a guy who wants to do the job as best he can, and the last thing he wants to have to deal with is the political sniping that I'm sure is going on," Panetta said in an interview. "It's probably not that comfortable for John, and it probably makes his job that much tougher because, again, this is a guy who has kind of a pretty straightforward approach to, 'This is my mission, and this is what I have to accomplish, and I haven't got time for the niceties of political chitchat.'"
Former Defense Secretary Robert Gates, whom Kelly also served as senior military assistant, noted that the retired general's legislative liaison experience gives him a lot of insight into how the government works, but military officials are simply not exposed to the politics of the place the way civilian officials are.
"I think that the political environment is more complicated and more challenging than it is in strictly a command role," Gates said.
Kelly admits that he did not get off on the best foot with Congress. Democratic members of the House came out of one early meeting calling
Kelly "dismissive" and expressing frustration. A subsequent meeting with the Congressional Hispanic Caucus in April went slightly better
, though members emphasized that the bar had been set low going in.
He has continued to have tense exchanges with the Congressional Hispanic Caucus, though they credit him for engaging, and has had a special interlocutor on the Senate side in California Sen. Kamala Harris, a Democrat on the homeland security committee in the upper chamber.
Caucus Chairwoman Michelle Lujan Grisham, a Democrat from New Mexico, said while she gives DHS some credit for engaging, Kelly's "temperament" is a concern, and his admonition to lawmakers to "shut up" if they won't change the laws that his officers are "sworn to enforce" at a public event at George Washington University just two weeks after the Congressional Hispanic Caucus meeting was a step backward.
"If you want to motivate Congress to do a better job -- and we could and we should -- don't tell them to 'shut up.' That's not a very professional way to do it," Grisham said.
Kelly acknowledges that when he took over DHS, his department was designed to be less responsive to Congress and the press, something he realized over time he should work to correct.
"I think maybe most administrations try to do this -- there was an attempt to control absolutely the message," Kelly said, reflecting. "So in the defense, I would say, of both the Congress and early on in the press, we did not have a forward-leaning posture. ... I want to talk to the press and the Hill about what my people do, and frankly, shame on us if someone like you writes an inaccurate story."
But Kelly's scolding tone for lawmakers returned as he criticized many for often calling his office with scant details on incidents they're supposedly investigating, or claim to have received no answers to letters they haven't yet sent, and then when he explains the truth of the matter, don't apologize.
"They never go to the press ... and say, 'You know what, I was dead wrong. Kelly just gave me an explanation. Thank goodness we have CBP people that are doing this job,'" Kelly said. "It's very frustrating. But that said, we have a sacred mission to protect the country and I'm proud of these people, and we'll protect them."