Scientific editors shape the content of academic journals and set standards for their fields. Yet, the degree to which the gender makeup of editors reflects that of scientists, and the rate at which editors publish in their own journals, are not entirely understood. Here, we use algorithmic tools to infer the gender of 81,000 editors serving more than 1,000 journals and 15 disciplines over five decades. Only 26% of authors in our dataset are women, and we find even fewer women among editors (14%) and editors-in-chief (8%). Career length explains the gender gap among editors, but not editors-in-chief. Moreover, by analysing the publication records of 20,000 editors, we find that 12% publish at least one-fifth, and 6% publish at least one-third, of their papers in the journal they edit. Editors-in-chief tend to self-publish at a higher rate. Finally, compared with women, men have a higher increase in the rate at which they publish in a journal soon after becoming its editor.