An implantable medical device including a nanocomposite coating depositedon at least a portion of a surface to provide a controlled release of a bioactiveagent in one or more dosages is described. The nanocomposite coating includesa matrix, a bioactive agent and inorganic particles. The inorganic particlesrespond to a stimulus, preferably by generating heat. The response of the particlesto the stimulus causes the matrix of the nanocomposite coating to undergo a volumechange by, for example, contracting or swelling, thereby releasing at leasta portion of the bioactive agent. A method of providing a controlled release ofa bioactive agent from a nanocomposite coating on an implantable medical deviceis described. A method for preparing an implantable medical device coated witha nanocomposite coating for the controlled release of a bioactive agent is alsodescribed.