Cowley had been in charge since March 2021 and joined the club alongside brother Nicky, who served as assistant head coach.
In two seasons in charge, the pair led Pompey to eighth and 10th-placed finishes in Sky Bet League One, but the team are currently on a poor run of form and are sat 12th in the table.
Their last league win came in October against Forest Green and Cowley's final game in charge came against Charlton on New Year's Day, when they were beaten 3-1 at home to extend their winless league run to nine games.
The club also confirmed that assistant head coach Nicky will be leaving.
Chief executive Andrew Cullen told the club website: "We are desperately disappointed that, following our recent run of results, we have today made the difficult decision to part company with Danny and Nicky.
"Both Danny and Nicky have given everything to Pompey, working so hard inside and outside of the training ground with a determination to bring success - not just to the football club, but to the city of Portsmouth and the wider community.
"Danny and Nicky both really understand Portsmouth and they should look back with pride at the progress and innovation they have delivered at the club.
"We will forever be grateful to them for their personal commitment towards reinvigorating the special connection between the football club and our community. We all wish Danny and Nicky success in everything they go on to do.
"We must now look forward and, with 24 league games still to play, we will focus all our efforts towards delivering the targets we set for this season. The search for a new coaching team will commence immediately."