Musk said the "pedo guy" tweet was not meant to be taken literally.
The Tesla co-founder filed a declaration that "pedo guy" is a common insult in South Africa used to insult demeanor and appearances.
He elaborated by saying, "It's quite common in the English speaking world. Calling someone a 'pedo guy' means creepy. If you did a search or asked someone what it means it would be a creepy."
Tesla CEO apologised directly to the cave diver in court, looking directly at him.
"I apologised in a tweet and again in the deposition, and I'll say it again - I apologise to Mr Unsworth," he said.
Meanwhile, Lawyers for Unsworth argued that Musk was using his social media platform to damage the explorer's reputation and paint him as a pedophile.
Last year, twelve boys and their coach were trapped in the Tham Luang cave complex, were rescued after a week-long intense drama.
Musk offered to assist the rescue mission by providing a submarine but the request was turned down on the ground that it would be unworkable.
Unsworth took on Musk in a widely-shared interview, saying the "mini-sub" "just had absolutely no chance of working".
In response, Musk tweeted several things, now-deleted, "Sorry pedo guy, you really did ask for it."
Then, a month later, he called Unsworth a "child rapist" in an email.
Unsworth sued two months later in a Los Angeles federal court, saying Mr Musk falsely branded him a paedophile and child rapist.