Micro/nanoscale multicolor barcodes with unique identifiability and a small footprint play significant roles in applications such as multiplexed labeling and tracking systems. Now, a strategy is reported to design multicolor photonic barcodes based on 1D Ln-MOF multiblock heterostructures, where the domain-controlled emissive colors and different block lengths constitute the fingerprint of a corresponding heterostructure. The excellent heteroepitaxial growth characteristics of MOFs enable the effective modulation of the coding structures, thereby remarkably increasing the encoding capacity. The as-prepared multicolor barcodes enable an efficient authentication and exhibit great potential in fulfilling the functions of anti-counterfeiting, information security, and so on. The results will pave an avenue to novel hybrid MOFs for optical data recording and security labels.