The 30-year-old has had a number of disciplinary issues in the past, missing a total of 54 weeks throughout his career for incidents including biting, punching and gouging.
O'Connell, who represented Ireland 108 times before calling time on his career last year, believes that Hartley has what it takes to make "great captain" material for the Lions, however, should he take lessons from his past mistakes.
"It might be tough on Dylan but he seems to have learned from all of the scrapes he's been in," he told BBC Sport. "I think he'd be a great captain."
Hartley missed out on the 2013 squad after picking up a red card for Northampton Saints in that year's Aviva Premiership final.