His first race will be April 7 at Martinsville Speedway.
Michael Waltrip Racing agreed to let the 54-year-old Martin out of driving the No. 55 Toyota at Texas, Kansas and Richmond. Martin will be replaced in those races by Brian Vickers, who already was running nine races in the No. 55 this season, including Martinsville.
"We've been real fortunate to have never been in this situation with the need to find someone to fill in for an injured driver," JGR president J.D. Gibbs said. "A lot goes into a decision like this, but we are really pleased to have someone of the character and caliber of Mark Martin to fill in while Denny is out.
"Obviously, we're not exactly sure how long that is going to take, but Mark's career speaks for itself and our team knows it will have the opportunity to compete for a win every week."
Hamlin suffered a compression fracture in his lower back during a last-lap wreck involving former JGR teammate Joey Logano on Sunday at Auto Club Speedway in California.
After an evaluation by Dr. Jerry Petty of Carolina Neurosurgery & Spine Associate, it was determined that Hamlin would need about six weeks to recover. Because the series is off this weekend for Easter, Hamlin would miss five races, beginning with Martinsville.
Martin was not scheduled to drive the No. 55 at Martinsville as part of his part-time schedule.
"I'm happy to have this opportunity to help out JGR, FedEx and Denny," Martin said. "Hopefully, I can keep those guys up front and compete for wins while Denny heals up."
Martin made one previous appearance for JGR when he finished second in the 2012 Nationwide Series at Las Vegas. In 48 career starts at Martinsville, Martin has two wins, 12 top fives and 25 top 10s. He has a career average finish of 13.3 at the half-mile track shaped like a paperclip.
Martin will not drive in the May 5 race at Talladega, which marks the end of the timetable for Hamlin's recovery. Sources said there is a chance Hamlin could at least start that race to collect points. If he is unable to finish he could give way to a backup driver. Because Talladega is a 2.66-mile track, a switch could be made under caution without losing a lap.
Vickers is not scheduled to drive the 55 in that race, so he is available if Hamlin can't drive or needs a backup.
JGR also looked at putting Vickers, who drives a full Nationwide Series schedule for the organization, in the No. 11 full time. But because Vickers is in line to replace Martin full time in the No. 55 next year, it was decided to give him more time with the team.
JGR Nationwide driver Elliott Sadler wasn't an option because he already is running a fourth JGR car at Kansas and Talladega with sponsors in place.
Gibbs said Hamlin, crew chief Darian Grubb and sponsor FedEx were all part of the decision process.
"I just hate not being able to be in the car right now, but I really appreciate Mark being able to fill in for me," Hamlin said. "Like everyone in NASCAR, I have a tremendous amount of respect for Mark and I know he will keep that FedEx Camry up front until I get back behind the wheel."
Gibbs confirmed earlier in the day that Martin was a possibility. He said for the sake of continuity he would prefer to go with one driver versus multiple drivers while Hamlin recovered.
"That consistency will be real helpful,'' Gibbs said.
The move could not have been made without the cooperation of MWR owner Michael Waltrip.
"We love to help our Toyota partners,'' he told ESPN.
Gibbs said the goal is to keep the No. 11 in contention for the owner's title. He also, based on scenarios he's seen, believes Hamlin still has a shot at making the Chase as a wild card and making a run at the driver championship.
"Our goal is each and every week, whether it's Denny or somebody else in there, we want to encourage FedEx and say this is why this program is valuable for their team,'' Gibbs said. "We're going to do whatever we can to make sure they have good experience week in and week out.''
Gibbs said Hamlin is frustrated, but hopes to return as soon as possible. He did not rule out that at some point during the healing process Hamlin could begin the race to collect points and then give way to a replacement driver.
He said the good news is the fracture was not major, which might have required surgery and extended Hamlin's time away from the car.
"Really, we don't know how long it will take,'' Gibbs said. "It's kind of up to Denny's body. He's been through it before [with knee surgery and back issues]. He's a tough dude. He's fighting to get back in that car as fast as he can.''