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. (ESPN)