(CNN) -- Author Joe McGinniss, who chronicled the murder case of former Green Beret doctor Jeffrey MacDonald in the 1983 book "Fatal Vision," has died, his lawyer said Monday. He was 71.
McGinniss died Monday afternoon at UMass Memorial Medical Center in Worcester, Massachusetts, said friend and attorney Dennis Holahan. He had been battling prostate cancer for two years.
He also wrote the 1969 bestseller "The Selling of the President 1968," a close look at the marketing and campaigning of presidential candidate Richard Nixon.
McGinniss had fly-on-the-wall access for Nixon's victorious run. Nixon had learned his lesson from his 1960 loss to John F. Kennedy. In '68, he put together a team of advisers to mold his television image, including 1960s TV hit "Laugh-In" head writer Paul Keyes, former CBS executive Frank Shakespeare, ad man Harry Treleaven and a producer named Roger Ailes, who had been working for former big-band singer Mike Douglas' daytime talk-variety show. (Ailes is now head of Fox News Channel.)
Together, Nixon's team played to the candidate's strengths and minimized his weaknesses ("Avoid closeups," wrote Treleaven in one memo).
Today, the book's details may seem old hat -- but still make for revealing reading.
In 2012, McGinniss, critcized by MacDonald supporters who said he betrayed the doctor, told CNN that he embedded with the defense team because he thought it would be fascinating to see how the lawyers and accused handled a high-profile murder case.
MacDonald was convicted of stabbing his pregnant wife and two young daughters to death at their home on a North Carolina military base.
"I learned everything from the first time in court. I didn't have my mind made up," McGinniss said.
MacDonald has steadfastly maintained his innocence.
McGinniss also made news when he moved next door to Alaska Gov. Sarah Palin in 2010 and wrote "The Rogue." Palin theatened to sue, saying the book was "a series of lies and rumors presented as fact."
He wrote 12 books in all, according to his website.
According to publisher Simon & Schuster, McGinniss lived in Massachusetts with his wife, Nancy Doherty, an editor and writer. He had five children -- including author Joe McGinniss Jr. -- and seven grandchildren.
CNN's Janet DiGiacomo contributed to this report.