Lithium-rich complex transition-metal oxides Li2MoO3, Li2RuO3, Li3RuO4, Li3NbO4, Li5FeO4, Li5MnO4 and their derivatives are of interest for high-capacity battery electrodes. Here, we report a first-principles density-functional theory study of the atomic and electronic structure of these materials using the Heyd-Scuseria-Ernzerhof (HSE) screened hybrid functional which treats all orbitals in the materials on equal footing. Dimerization of the transition-metal ions is found to occur in layered Li2MoO3, in both fully lithiated and partially delithiated compounds. The Ru-Ru dimerization does not occur in fully lithiated Li2RuO3, in contrast to what is commonly believed; Ru-Ru dimers are, however, found to occur in the presence of lithium vacancies caused by lithium loss during synthesis and/or lithium removal during use. We also analyze the electronic structure of the complex oxides and discuss the delithiation mechanism in these battery electrode materials.