Kelly, who lost a son in combat in Afghanistan, is the third recently retired general to join Trump's Cabinet. Like the others, he clashed at times with the Obama administration.
If confirmed by the Senate, Kelly will be tasked with carrying out some of Trump's most controversial campaign pledges, including building a wall along the border with Mexico, boosting deportations of immigrants in the country illegally and vetting visitors from Muslim-majority nations.
"He is the right person to spearhead the urgent mission of stopping illegal immigration and securing our borders, streamlining [the Transportation Security Administration] and improving coordination between our intelligence and law enforcement agencies," Trump said in a statement.
Kelly, 66, said he was "humbled and grateful" to be picked.
"The American people voted in this election to stop terrorism, take back sovereignty at our borders, and put a stop to political correctness that for too long has dictated our approach to national security," he said in a statement.
"I will tackle those issues with a seriousness of purpose and a deep respect for our laws and Constitution. I am honored for the opportunity to be back in the service to our country and our people."
Kelly, a Boston native, enlisted in the Marine Corps in 1970 and was discharged as a sergeant in 1972. He was commissioned as an officer after he graduated from the University of Massachusetts in 1976.
Since then, he has commanded Marines from platoons up through corps level and combatant command, including multiple tours in Iraq.
He also is a veteran of bureaucratic and political battles in Washington.
He served as the Marines liaison officer to the House of Representatives, and then later to the entire U.S. Congress. He later served as a senior military assistant to Defense secretaries Robert M. Gates and Leon E. Panetta.
Beginning in late 2012, he headed the U.S. Southern Command, the Pentagon's regional headquarters for operations in the Caribbean, Central America and South America.
He retired in January as a four-star general, the first since the Korean War to be promoted to that rank while in active combat.
He had a more painful distinction as the highest-ranking U.S. military officer in years to lose a son or daughter in combat.
His son, Marine Lt. Robert M. Kelly, was killed by a land mine in 2010 while he was leading a Marine platoon against the Taliban in southern Afghanistan. At the funeral at Arlington National Cemetery, Kelly blamed "an enemy that is as savage as any that ever walked the earth."
By choosing the retired general, Trump signaled a more militarized approach to border security after railing on the campaign trail about growing risks on America's borders.
As head of the Southern Command, Kelly ordered military operations in the Pacific Ocean and the Gulf of Mexico to try to stop drug smugglers. The role made him an attractive candidate to Trump's transition team.
Kelly's forces also helped authorities deal with the flood of families, including thousands of children, who sought refuge in America after fleeing violence and crime in Central America.
He may have benefited from his clashes with the Obama administration over its unsuccessful attempts to close the prison for terrorism suspects at Guantanamo Bay in Cuba, which came under the Southern Command.
He rejected critiques from human rights groups about alleged mistreatment of detainees, including efforts to force-feed prisoners on hunger strikes. Trump has vowed to keep the prison open.
Kelly also objected publicly to the Pentagon's order last year to open Navy SEAL jobs and other combat roles to women, telling reporters it would create pressure to lower standards for women in elite units.
Kelly also has been skeptical of laws legalizing marijuana sales in California, Colorado and elsewhere.
U.S. officials have pressured governments in Central America to crack down on illicit drug production, and they "look at us in disbelief" when they hear about state legalization efforts, Kelly told the Senate Armed Services Committee in March 2014.
"'Hypocrite' sometimes works its way into the conversation, the word 'hypocrite,'" Kelly said.
If confirmed, Kelly will run a department that has struggled with management and morale problems since its creation after the terrorist attacks of Sept. 11, 2001.
It includes 22 agencies and nearly 250,000 federal employees who protect the president, tell airline passengers to remove their shoes, deliver aid after natural disasters, patrol on horseback along the border and do numerous other jobs.
One of Kelly's first tasks may be to expand existing barriers on the border with Mexico by diverting money from other border security projects. Trump recently said some of the wall he repeatedly promised could be fencing.
Kelly joins another retired four-star Marine general,
Another retired four-star Army general,
Trump has never served in the military or in government. His reliance on so many former generals for powerful Cabinet posts has sparked concerns about the potential of undue military influence in his administration.
Unlike Mattis, Kelly does not need a waiver from Congress to be confirmed. A 1947 law seeks to maintain civilian control of the Pentagon, but it doesn't apply to other Cabinet posts.
Kelly was chosen over several candidates, including Rep.
11:40 a.m. Dec. 12: The story was updated throughout with new information.