For several days, investigators searched the area near Hernandez's home as they investigated Lloyd's death. Authorities said Wednesday the investigation was ongoing.
In addition to the first-degree murder charge, Hernandez faces five weapons-related charges, including carrying a firearm without a license.
It was unclear whether there had been any additional arrests in the case.
"One critical part of this case that we don't know anything about at this point is the two other men (Hernandez is) accused of being with," CNN senior legal analyst Jeffrey Toobin said. "Were they shooters? Were they involved? Will they flip against Hernandez? They are obviously key figures in this, and we'll watch how that unfolds."
In court on Wednesday, the prosecutor described what he alleged was a tense conversation between Hernandez and Lloyd inside the Nissan Altima and described what Hernandez and his associates had done at the scene of the shooting. He did not reveal how investigators had learned that information.
Inside the car, according to McCauley, Hernandez told Lloyd he was angry because of Lloyd's behavior at a Boston club they had gone to together several days earlier.
"There were certain things that had happened during the night that he was upset about and now didn't trust the victim," McCauley said. "He told him one of the things he was mad about. ... At the club the victim had spoken to a couple of people, and the defendant told him that he was upset about that because he had some troubles with those people."
Victim's family reacts
Lloyd's sister, Olivia Thibou, told CNN last week that her brother and Hernandez went to a Boston nightclub together a few days before Lloyd's death.
Her brother was dating the sister of Hernandez's fiancee, she said.
She said she didn't know of any problems between Hernandez and her brother, who worked for a landscaping company.
Before Wednesday's hearing, Thibou said she was glad to hear about Hernandez's arrest.
"God is great," she said. "It's the best news I've had since my brother was killed last week."
Patriots drop Hernandez
The Patriots -- who gave Hernandez a five-year, $40 million contract last year -- released him from the team after his arrest, but before the charges against him were made public Wednesday.
"Words cannot express the disappointment we feel knowing that one of our players was arrested as a result of this investigation," the team said in a statement.
The NFL released its own statement, calling the involvement of a player in the case "deeply troubling."
Both the NFL and Patriots expressed sympathy for the victim's family.
On Wednesday, about a half-dozen plainclothes police officers went to Hernandez's house and then led him out in handcuffs. He was wearing a white T-shirt and shorts.
Sheriff: Gang unit will investigate Hernandez's tattoos
Bristol County Sheriff Tom Hodgson said he expects living behind bars will be a major adjustment for the former NFL star.
Wednesday night's dinner at the Dartmouth House of Correction was chop suey, green beans and a slice of bread, the sheriff said. Hernandez will only be allowed out of his one-person cell for showers and phone calls. Authorities will perform background checks on any visitors.
Hodgson said he met with Hernandez "as soon as he came in" to the facility and told him he'd receive no special treatment.
Asked how Hernandez responded, Hodgson said, "He did not seem nervous," adding he was "polite and respectful."
Hernandez is currently being held in the jail's medical unit while he undergoes further screening, including mental health, physical and security tests.