About 75 firefighters were sent to the 200 block of North Temescal Canyon Road, at Pacific Coast Highway, about 1:35 p.m., said Erik Scott of the Los Angeles Fire Department.
One of the men, who had been buried up to knee-level, was freed more than an hour into the rescue operation.
Crews used specialized equipment to shore up the trench in an effort to free the second man, but it was too late to save him.
His death turned the operation from a rescue to a body recovery operation, which was expected to last as long as eight hours.
Paramedics, some of whom were members of the fire department's Urban Search and Rescue Team, were "working very hard to remove him as rapidly as possible," Scott said, "but we have to minimize movement around the hole." He said the whole operation "was a very delicate prospect."
Scott said the trench was 20 feet long and U-shaped, but its depth was unclear.
The names of the workers were not immediately released.