Spectacular fossils from the Early Cretaceous Jehol Group of northeastern China have greatly expanded our knowledge of the diversity and palaeobiology of dinosaurs and early birds, and contributed to our understanding of the origin of birds, of flight, and of feathers. Pennaceous (vaned) feathers and integumentary filaments are preserved in birds and non-avian theropod dinosaurs, but little is known of their microstructure. Here we report that melanosomes (colour-bearing organelles) are not only preserved in the pennaceous feathers of early birds, but also in an identical manner in integumentary filaments of non-avian dinosaurs, thus refuting recent claims that the filaments are partially decayed dermal collagen fibres. Examples of both eumelanosomes and phaeomelanosomes have been identified, and they are often preserved in life position within the structure of partially degraded feathers and filaments. Furthermore, the data here provide empirical evidence for reconstructing the colours and colour patterning of these extinct birds and theropod dinosaurs: for example, the dark-coloured stripes on the tail of the theropod dinosaur Sinosauropteryx can reasonably be inferred to have exhibited chestnut to reddish-brown tones.