A 3D COF was created, characterised by an interconnected mesoporous scaffold that showed effective drug loading and release in a simulated body fluid environment, making it useful as a nanocarrier for pharmaceutical drugs.