Carroll has found form in recent weeks at Upton Park, scoring seven goals in his last 14 Premier League games.
Hammers boss Sam Allardyce has been skeptical over his chances of signing Carroll this summer, with his loan spell from Liverpool due to expire at the end of the current campaign.
Cole believes that Carroll has given Reds boss Brendan Rodgers a timely reminder of his qualities in recent weeks, but wants the England international to stay with West Ham.
He told The Metro: "I don't know the ins and outs of the deal but the way he's been playing in the last couple of weeks you can understand why Liverpool paid £35m for him a couple of years ago.
"I think all the boys want him to stay at West Ham. He's [his own] man, though, and he has his own agenda.
"I don't know what Liverpool are thinking and I'm sure there will be other clubs in for him. West Ham would like to keep him, he's our top scorer. He's got to do what's right for him, though."
Carroll's goal glut has helped West Ham secure safety under Allardyce, with the Hammers currently 10th on their return to the top flight.