The ancient practice of concocting magic pills for immortality or spiritual transformation; divided into the physical processing of minerals and herbs, known as 外丹术wàidānshù, and the later internal practice involving meditation and breathing, known as 内丹术nèidānshù.