As commanding officer of Company C, 1st Battalion, 26th Marines, 5th Marine Division, during the Iwo Jima campaign, Captain Dunlap led his company through a hail of artillery, mortar, rifle and machine gun fire in a determined advance from low ground uphill toward the steep cliffs from where the enemy poured a devastating rain of bullets and shrapnel. It was the day following the original landing on February 19, 1945. When the volume of enemy fire finally became too intense to advance any further toward the caves located high to the front, Capt Dunlap held up his company and crawled alone approximately 200 yards forward of his front lines, while his men watched in fear and admiration. From this position at the base of the cliff, about 50 yards from the Japanese lines, the captain spotted the enemy gun positions, and, returning to his own lines, relayed the vital information to the supporting artillery and naval gunfire units. Persistently disregarding his own safety, he then placed himself in an exposed vantage point to direct a more accurate supporting fire. Captain Dunlap worked without respite for two days and two nights under constant enemy fire, skillfully directing a smashing bombardment against the almost impregnable enemy positions. During this critical phase of the battle, his company suffered heavy casualties, but by his inspiring leadership and indomitable fighting spirit Capt Dunlap spurred his men on to heroic efforts which resulted in the final decisive defeat of Japanese countermeasures in that sector.
On February 26, 1945, Captain Dunlap was felled by a bullet wound in the left hip. He was evacuated from Iwo Jima and subsequently was a patient at the U.S. Naval Hospitals at Guam, Pearl Harbor, San Francisco, and Great Lakes, Illinois.
The Medal of Honor was awarded by President Harry S. Truman to Captain Dunlap in ceremonies at the White House on December 18, 1945. Later, after nearly 14 months of hospitalization, Capt Dunlap was discharged from the Great Lakes Naval Hospital on April 20, 1946. He went on inactive duty in September 1946 and was retired with the rank of major on December 1, 1946.