A method for preparing a pharmaceutical compound by way of magnetic carbon nanocapsules is disclosed. The method comprises steps of: (a) providing a magnetic carbon nanocapsule with C—(COOH)2 group, and Pt cations, to form a complex (b) collecting the complex from the magnetic carbon nanocapsule and (c) removing the Pt cations on the complex.