We identify a total of 120 early-type brightest cluster galaxies (BCGs) at 0.1 < z < 0.4 in two recent large cluster catalogues selected from the Sloan Digital Sky Survey (SDSS). They are selected with strong emission lines in their optical spectra, with both Hα and [O II]λ3727 line emission, which indicates significant ongoing star formation. They constitute about ∼0.5 per cent of the largest, optically selected, low-redshift BCG sample, and the fraction is a strong function of cluster richness. Their star formation history can be well described by a recent minor and short starburst superimposed on an old stellar component, with the recent episode of star formation contributing on average only less than 1 per cent of the total stellar mass. We show that the more massive star-forming BCGs in richer clusters tend to have higher star formation rate (SFR) and specific SFR (SFR per unit galaxy stellar mass). We also compare their statistical properties with a control sample selected from X-ray luminous clusters, and show that the fraction of star-forming BCGs in X-ray luminous clusters is almost one order of magnitude larger than that in optically selected clusters. BCGs with star formation in cooling flow clusters usually have very flat optical spectra and show the most active star formation, which may be connected with cooling flows.