4D printing is a fledgling technology with enormous potential that may bring revolution to the future manufacturing industry along with pharmaceuticals. MIT's Self Assembly Lab and Stratasys education and R&D department first developed this concept jointly in 2013. 3D printing has already proved its competence and achieved wide acceptance after being invented in 1984. 4D printing is an up-gradation of 3D printing technology. 4D printing adopts time as the 4th dimension. It allows the fabrication of stimuli-responsive 3D structures that can independently change its morphology over time. External stimuli such as light, pH, magnetic field, moisture content, etc. can trigger the shape-changing event. 4D printing technology can be applied to develop site-specific, controlled release as well as a customized drug delivery system. Researchers are also optimistic about its application in the biomedical sector. This paper presents a comprehensive review of the basic mechanism of 4D printing technology and its possible future application and prospects in the pharmaceuticals and biomedical fields