He didn't have the vial though. After you get the cure to work with Mr. Freeze, and it is stolen by Harley Quinn, she is intercepted by Talia, who steals it from her. When you find Harley tied up not far from the room with Clayface Joker, you are supposed to assume Joker tied her up as one of his little games he plays with her, but in truth it was Talia that got her right before she reached the real Joker in whatever hiding place he was staying. Clayface Joker, probably unaware that Harley was intercepted and working to keep up the charade, decides to go with Talia while the real Joker continued to wait for Harley, only for her to never show up, thus causing Joker to assume Batman had got to her first and stolen the cure. He then informs Clayface Joker, and the two decide to instead use Talia for leverage to trap Batman and regain the cure, unaware that she had it the whole time.
As for why Joker had Clayface start the charade of him being healthy before he himself gained the cure, it is likely his "troops" may have started defecting from him if they knew the extent of his illness by that point, so he had Clayface imitate a healthy appearance so that morale would be higher for the breakout he was planning. So in the end, Joker never had the cure, he was close to getting it, but it never got into his hands.