Regulatory sequences encode crucial gene expression signals, yet the sequence characteristics that determine their functionality across species remain obscure. Deep generative models have demonstrated considerable potential in various inverse design applications, especially in engineering genetic elements. Here, we introduce DeepCROSS, a generative artificial intelligence framework for the inverse design of cross-species and species-preferred 5' regulatory sequences in bacteria. DeepCROSS constructs a meta-representation using 1.8 million regulatory sequences from thousands of bacterial genomes to depict the general constraints of regulatory sequences, employs artificial intelligence-guided massively parallel reporter assay experiments in E. coli and P. aeruginosa to explore the potential sequence space, and performs multi-task optimization to obtain de novo regulatory sequences. The optimized regulatory sequences achieve similar or better performance to functional natural regulatory sequences, with high success rates and low sequence similarities with the natural genome. Collectively, DeepCROSS efficiently navigates the sequence-function landscape and enables the inverse design of cross-species and species-preferred 5' regulatory sequences.