The RNA-world hypothesis assumes that life on Earth started with small RNA molecules that catalyzed their own formation. Vital to this hypothesis is the need for prebiotic routes towards RNA. Contemporary RNA, however, is not only constructed from the four canonical nucleobases (A, C, G, and U), it also contains many chemically modified (noncanonical) bases. A still open question is whether these noncanonical bases were formed in parallel to the canonical bases (chemical origin) or later, when life demanded higher functional diversity (biological origin). Here we show that isocyanates in combination with sodium nitrite establish methylating and carbamoylating reactivity compatible with early Earth conditions. These reactions lead to the formation of methylated and amino acid modified nucleosides that are still extant. Our data provide a plausible scenario for the chemical origin of certain noncanonical bases, which suggests that they are fossils of an early Earth.