The first deal sent Hoffman, ECHL defenseman Cody Donaghey and Ottawa's fifth-round choice in the 2020 draft to San Jose for veteran forward Mikkel Boedker, defenseman Julius Bergman and a sixth-round draft choice in 2020.
Senators general manager Pierre Dorion said in a statement that the trade "showcases our determination to strengthen the future of the team by improving chemistry, leadership and character in the locker room and on the ice."
About two hours later, Hoffman was traded again, this time going from San Jose to Florida along with a seventh-round pick in this year's draft for the Panthers' picks in the second, fourth and fifth rounds of the draft, which begins Friday.
"Mike is a skilled, consistent and hard-working player who has proven himself to be a talented goal scorer in the NHL," Panthers president and GM Dale Tallon said in a statement. "His speed, experience and offensive abilities will bolster our top-six group."
On May 4, Melinda Karlsson filed an order of protection against Monika Caryk, Hoffman's fianceé, alleging that she harassed the Karlssons online. That harassment included remarks about the death of their child, who was stillborn in March, via comments on Melinda Karlsson's Instagram account under a pseudonym.
"Monika Caryk has uttered numerous statements wishing my unborn child dead ... uttered that she wished I was dead and that someone should 'take out' my husband's legs to end his career," the document said, according to media reports.
Hoffman and Caryk have denied the accusation.
"It's 150 percent that it's not us," Hoffman told the Ottawa Citizen. "We have nothing to hide. We're willing to cooperate in any way to solve this and figure it out and prove that it wasn't us."
But the court of public opinion ruled against them swiftly. That included the spouses of former Senators players who spoke out against Caryk and in support of the Karlssons on social media.
"This crossed the line from cyber bullying to something entirely different in April," Julie Turris, the wife of former Senators center Kyle Turris, wrote on Twitter. "Unfortunate that this private matter has become public. Incredibly proud of my girl for standing up for herself and her family, it took courage."
Tallon said he was confident Florida's locker room would accept Hoffman and wasn't worried about the situation in Ottawa being a problem.
"We did our homework and we discussed it with a lot of different people," Tallon said. "We feel that that's in the past and the distractions. We're very confident that he'll be embraced by our team and by their wives and girlfriends. We have a strong culture down there now and I think talking with Mike and all the parties that it will work out to our benefit."
Hoffman has 107 goals and 123 assists in 342 games for the Senators since 2011-12. He was viewed as a valuable commodity at the trade deadline for teams seeking a productive left winger with a reasonable cap hit of $5,187,500 through 2020.
"He's going to be a huge part of our club," Panthers goaltender Roberto Luongo told reporters in Las Vegas prior to the NHL Awards ceremony on Wednesday. "It's a big piece for us. We're excited to add somebody that can play on the top two lines. We already have a great group, but I think adding him really helps out as far as the offensive side of the puck."
Boedker, 28, is coming off a 37-point season and makes $4 million through 2020. For Ottawa, the attention now turns to Karlsson, the team's superstar, who can sign a new deal with the Senators beginning July 1. He can become an unrestricted free agent in the summer of 2019.
The Sharks, who paid a bargain-basement price to acquire scoring winger Evander Kane at the trade deadline when Buffalo was eager to deal him, shed Boedker's $4 million salary-cap hit over the next two seasons and cleared room to make some splashes this summer.
"We have witnessed some tremendous growth in our younger forwards over the past season and we feel that we have another group of players that are ready to challenge for additional ice time," Sharks GM Doug Wilson said. "These transactions have also allowed us to add to our pool of draft selections, as well as free up a substantial amount of cap space for internal and external player options in the coming months."
ESPN's Greg Wyshynski and The Associated Press contributed to this report.
Hoffman traded twice amid cyberbullying investigation
Emily Kaplan explains how Sharks GM Doug Wilson capitalized on Mike Hoffman's diminished value and then moved Hoffman in a separate deal to the Panthers hours later.