In 2004, he was assigned to command the 3rd Armored Cavalry Regiment (3rd ACR). Shortly after McMaster took command the regiment deployed for its second tour in Iraq and was assigned the mission of securing the city of Tal Afar. That mission culminated in September with Operation Restoring Rights and the defeat of the city's insurgent strongholds. President Bush praised this success, and the PBS show Frontline broadcast a documentary in February, 2006 featuring interviews with McMaster. CBS' 60 Minutes produced a similar segment in July,[6] and the operation was the subject of an article in the April 10, 2006 issue of The New Yorker.

Author Tim Harford has written that the pioneering tactics employed by 3rd ACR led to the first success in overcoming the Iraqi insurgency. Prior to 2005, tactics included staying out of dangerous urban areas except on patrols, with US forces returning to their bases each night. These patrols had little success in turning back the insurgency because local Iraqis who feared retaliation would very rarely assist in identifying them to US forces. McMaster deployed his soldiers into Tal Afar on a permanent basis, and once the local population grew confident that they weren't going to withdraw nightly, the citizens began providing information on the insurgents, enabling US forces to target and defeat them.[4][7]

McMaster passed command of the 3rd Armored Cavalry Regiment on June 29, 2006 and joined the International Institute for Strategic Studies in London, as a Senior Research Associate with a mandate described as "conduct[ing] research to identify opportunities for improved multi-national cooperation and political-military integration in the areas of counterinsurgency, counter-terrorism, and state building", and to devise "better tactics to battle terrorism."[8]

From August, 2007 to August, 2008 McMaster was part of an "elite team of officers advising US commander" General David Petraeus on counterinsurgency operations in Iraq.[9] Petraeus and most of his team were stationed in Fort Leavenworth at the time but McMaster collaborated remotely, according to senior team member John Nagl.[4][7]

McMaster was passed over for promotion to Brigadier General in 2006 and 2007, despite his reputation as one of "the most celebrated soldiers of the Iraq War."[10] Though the rationale for promotion board decisions is not made public, it is generally agreed that McMaster was held back because of his tendency to argue against the status quo.[11][12][13]

McMaster was nominated for Brigadier General on the 2008 promotion list.[14]Secretary of the ArmyPete Geren had requested General Petraeus to briefly return from Iraq to take charge of the promotion board as a way to ensure that the best performers in combat received every consideration for advancement, and it is generally acknowledged that Petraeus's presence ensured that McMaster was among those selected.[4][15]

In July 2010 he was selected to be the J-5, Deputy to the Commander for Planning, at ISAF (International Security Assistance Forces) Headquarters in Kabul, Afghanistan. Additionally, McMaster directed a joint anti-corruption task force (CJIATF-Shafafiyat) at ISAF Headquarters.

The promotion issue re-surfaced in 2011, when he was not selected for Major General along with his peers[18] despite being called "probably our best Brigadier General" by Army Chief of Staff General Martin Dempsey.[19]

McMaster as commander of the Maneuver Center of Excellence in 2012.

McMaster was nominated for Major General on January 23, 2012. In April, 2012 he was announced as the next commander of the Army's Maneuver Center of Excellence (MCoE) at Ft. Benning.[20]

On June 13, 2012 McMaster assumed command of the MCoE and was promoted to Major General at a ceremony at Ft. Benning.[21]

“It is heartening to see the Army reward such an extraordinary general officer who is a thought leader and innovator while also demonstrating sheer brilliance as a wartime brigade commander,” retired Army Gen. Jack Keane, a former Army vice chief, said of the promotion.[23]

In April 2014, Maj General McMaster made Time magazine's list of 100 most influential people in the world. He is hailed as "the architect of the future U.S. Army" in the accompanying piece written by retired Lt. Gen. Dave Barno, who commanded U.S. and allied forces in Afghanistan from 2003 to 2005.

"Major General Herbert Raymond McMaster might be the 21st century Army's pre-eminent warrior-thinker," Barno wrote. "Recently tapped for his third star, H.R. is also the rarest of soldiers—one who has repeatedly bucked the system and survived to join its senior ranks."

McMaster is cited for his "impressive command and unconventional exploits in the second Iraq war," Barno wrote.[24]

In July 2014 McMaster was promoted to Lieutenant General and began his duties at the Army Capabilities Integration Center.[25]

Dereliction of Duty: Lyndon Johnson, Robert McNamara, The Joint Chiefs of Staff, and the Lies that Led to Vietnam is a book written by then Major McMaster that explores the military's role in the policies of the Vietnam War. The book was written as part of his Ph.D. dissertation at University of North Carolina at Chapel Hill.

The book examines Robert McNamara and U.S. President Lyndon B. Johnson's staff, alongside the military and particularly the Joint Chiefs of Staff, failure to provide a successful plan of action to pacify either a Viet Cong insurgency or decisively defeat the North Vietnamese Army.

McMaster details why military actions intended to indicate "resolve" or to "communicate" ultimately failed when trying to accomplish sparsely detailed, confusing, and conflicting military objectives.