A black Honda SUV was seen speeding from the crime scene. Police matched the description to Nicodemo's vehicle, which was found parked at his home in the Packer Park section of South Philadelphia.
Nicodemo, 42, who is married with two children, was being held without bail. He was charged with first-degree and third-degree murder, conspiracy to commit murder, possession of an instrument of crime, and firearms violations.
The slaying of DiPietro, a convicted drug dealer, occurred while a federal court jury in Philadelphia was hearing evidence in the racketeering trial of seven alleged mobsters.
Trial observers speculated about a possible link between the trial and DiPietro's homicide.
Prosecutors have not given an alleged motive for the killing. George Anastasia, an expert on organized crime, has said DiPietro was rumored to be cooperating with law enforcement.
Prosecutors were able to take the case to an indicting grand jury because the Pennsylvania Supreme Court last June approved their use by counties.
The secrecy of the grand jury process is intended to mitigate witness and victim intimidation, though defense lawyers say it provides cover for weak cases.
Contact Robert Moran at 215-854-5983, or bmoran@phillynews.com, or follow @RobertMoran215 on Twitter.