The 33-year-old Croatian, a Monaco resident, fell into his chair in tears after the defeat while the sparse crowd granted him a standing ovation.
He was gifted a special award from ATP boss Brad Drewett and tournament director Zeljko Franulovic during a post-match ceremony on court.
Ljubicic was overcome with emotion as a Roger Federer tribute and some of his career highlights, including victory at Indian Wells in 2010, were broadcast on the court's giant screen.
"I felt like it could end up emotional but I didn't expect it this big, this emotional. Obviously, it's the end of something beautiful for me," Ljubicic told a news conference.
"It was a tough day for me both on the court and off the court. I knew my mind was everywhere else but on the tennis court."
The famous bald-headed Ljubicic had announced he would play his last event at home in Monte Carlo.
"For me, it's a special place. In 1999, big tennis started here for me, qualifying, beating Andriy Medvedev and Yevgeni Kafelnikov," Ljubicic said.
"In a way, to wrap it up and finish off here... I think it was the right place to do that."
He never threatened the 59th-ranked Dodig, who put an end to his fellow countryman's 15 year-career in one hour 11 minutes.
"I think this is the first time that I'm not happy to win the match... All players like me, like Mario Ancic, we learnt from him," Dodig said.
Known for his ability to play on all surfaces, Ljubicic had his best year in 2005 when he reached two Masters series event finals and won the Davis Cup. He was ranked at three in 2006.
In the day's other first round action Viktor Troicki beat Jean-Rene Lisnard 6-3 6-1 and ninth seed Gilles Simon defeated wild card Benjamin Balleret 6-3 6-2.