Green pressure groups had lodged a legal complaint against the original plan, arguing the environmental impact of dumping mud and sand on fragile coastal wetlands would be devastating, reported Reuters.
The Hamburg city government said it was pleased the court had in principle accepted that dredging can take place.
"We have at least legal security," said the city's economy minister Frank Horch. The planning application must be amended but "there is no doubt" that the dredging will take place, he said in a statement.
Hamburg wants to make it easier for new large container vessels to reach the port regardless of the tide to counter intense competition from Rotterdam, Antwerp and Bremerhaven.
Despite the river having been deepened six times already, some of the largest ships face a costly wait for high tides to dock in Hamburg and the city fears shipping lines will switch to other ports if the Elbe is not dredged further.
The court ruled that although parts of the planning process were incorrectly handled and broke planning law, this should not in principle stop Hamburg getting consent to dredge the river.
Authorities must now take rapid action to resolve the deficiencies in the planning process, especially involving damage to water quality from the dredging, it said. If immediate action was taken a supplementary planning permission process for the dredging could be completed in 2018.
The city of Hamburg and federal waterways authorities want to dredge 130 kilometres of the river so that ships with 14.5-metre draught can reach the port, against 13.5 metres now.