The blast took place early Saturday in Seaside Park, a New Jersey beach town about 80 miles (129 kilometers) south of New York City, at around 9:30 a.m. local time.
The pipe bomb was one of several devices wired together in a plastic garbage bag, said Al Della Fave, a spokesman for the Ocean County Prosecutor's office.
"The one went off, and the others did not," he added. No injuries or damage to surrounding structures were reported.
Around 5,000 people were due to take part in Saturday's Semper Five 5K run, a charity race that aims to raise money for military veterans and their families.
Participants had been scheduled to pass by the area near the explosion around the time the blast occurred. The start of the race was delayed, however, after an unattended backpack was also found.
Following the blast, authorities immediately canceled the race and the area was put on lockdown. Around 30 homes were also evacuated and bomb-sniffing dogs sent out to search the surrounding streets. Investigators said the motive behind the pipe bomb wasn't immediately clear.
"What the intentions of the individual are we don't know whether it's criminal or terroristic. It's obvious it was meant to affect the run," Della Fave told CNN.
Asked if Marines and their families had been targeted, Della Fave said, "I think we can assume that, considering the location of the device right along the run route where, if it was just a matter of minutes in terms of difference, there would have been a good number of people running past that explosive device."
Numerous state and federal law enforcement agencies are investigating the incident.
"Working with the FBI and ATF [Bureau of Alcohol, Tobacco, Firearms and Explosives], we are taking every step to ensure the safety of the public and to determine who was responsible for this explosion," Attorney General Christopher Porrino said in a statement.
"We are grateful that nobody was injured, but this is a serious act of violence against the people of New Jersey. We will not rest until we find the person or persons responsible."
As the events unfolded on Saturday, the explosion stirred memories of the deadly blasts at the 2013 Boston Marathon. Two pressure cooker bombs exploded at the finish line of the race, killing three people and wounding more than 260.
ksb/cmk (AP, Reuters, dpa)