Sri Lanka's victory over England has piled even further pressure on Cook, whose leadership has been questioned in recent months, while he continues to struggle to find form with the bat at the top of the order.
However, Dhoni believes that it is now time for his teammates and supporters to get behind the 29-year-old as he looks to lead a recovery alongside head coach Peter Moores.
"I think it's very important to back players. It doesn't matter whether he is the captain of the side or a batsman or a bowler," the wicketkeeper told reporters ahead of the five-match Test series against England.
"A bad phase is something that every player goes through and you just need to back players at the right point because when you are getting those big hundreds and two-hundreds then everybody will be on your side.
"But the real test of character is when your fans or the media or your teammates are supporting you when you are not doing well."
The first Test match begins on July 9 at Trent Bridge.