Mark McGwire is coming home as hitting coach for the Los Angeles Dodgers, lured by the chance to spend more time with his wife and five young children.

He was hired Wednesday to replace Dave Hansen and improve an offense that struggled last season when All-Star slugger Matt Kemp was hobbled by injuries. The Dodgers were 13th in the National League in runs scored and RBIs and 15th in home runs.

"It's the first time in my baseball career I have an opportunity to live at home and work at home," McGwire said on a teleconference. "To do what I love, still be in the game of baseball and to be at home, it just fit perfectly."

McGwire spent the past three seasons in the same job with the St. Louis Cardinals, where he starred during parts of his 16-year major league career. During McGwire's tenure, the Cardinals led the National League in batting average (.269) and on-base percentage (.337), ranked second in runs (2,263) and fourth in slugging percentage (.416).

He worked with All-Star sluggers Carlos Beltran, Lance Berkman, Matt Holliday and Albert Pujols, while helping develop 2011World Series MVP David Freese.

But as much as he enjoyed the job and the team's success, McGwire said last season "was probably one of the hardest on me family-wise."

His two sons, ages 9 and 10, have started playing Little League, and he and his wife, Stephanie, have 2-year-old triplet daughters. McGwire also has a 25-year-old son from a previous marriage. The couple lives in Orange County.

"Being away from the girls, it took a little bit for them to realize Daddy was back a couple weeks ago," he said, adding that he wasn't certain he would have returned to St. Louis if the Dodgers hadn't pursued him.

Once they did, he turned down the Cardinals' contract extension and started phoning the team's players and staff to say goodbye.

"It was very, very hard to call everybody," he said.

McGwire is from the Los Angeles suburb of Pomona. He played college baseball at Southern California and was a member of Oakland's 1989 World Series champion team.

"I grew up a Dodger fan," he said.

McGwire is a 12-time All-Star who in winter 2010 ended years of denials and a self-imposed exile from the sport by admitting he took performance-enhancing drugs during his career, including when he broke Roger Maris' record of 61 home runs with 70 long balls in 1998. He retired in 2001 with 583 career homers, ranking 10th on the all-time list.

"It's a mistake that I've made, I've owned up to it, I've moved on," he said. "That's something I have to live with the rest of my life."

There was little public outcry when McGwire returned to the Cardinals as hitting coach, and Dodgers general manager Ned Colletti said he can live with McGwire's past.

"He's owned up to making a mistake, but there's so many other great qualities about him that you forgive the mistake," he said. "That he apologized is very important."

McGwire will be working with an accomplished group of hitters on the Dodgers, including All-Stars Kemp, Andre Ethier, Hanley Ramirez and Adrian Gonzalez.

"I absolutely love the job of being a hitting coach," he said. "I love teaching and being around the game of baseball."

Colletti said he sought McGwire partly after seeing how well-prepared the Cardinals' hitters were, including their ability to make in-game adjustments.

"We kept thinking about guys that had had success both with veteran players and also young players. We kept coming back to Mark," he said. "We benefited from Mark's love of his young family and where he resides. We're very privileged and thrilled to have a person of this quality be our hitting coach."

Colletti said the Dodgers would hire an assistant hitting coach later this week.

McGwire said he has no immediate managerial aspirations.

"But I would never rule it out," he said. "Right now I'm having way too much fun working with the hitters."