Mahewu is a fermented food product from maize, commonly consumed in Southern Africa. This study investigated the effect of optimizing fermentation (time and temperature) and boiling time of white maize (WM) and yellow maize (YM) mahewu, with the use of the Box–Behnken-response surface methodology (RSM). Fermentation time and temperature as well as boiling time were optimized and pH, total titratable acidity (TTA) and total soluble solids (TSS) determined. Results obtained showed that the processing conditions significantly (p ≤ 0.05) influenced the physicochemical properties. pH values of the mahewu samples ranged between 3.48–5.28 and 3.50–4.20 for YM mahewu and WM mahewu samples, respectively. Reduction in pH values after fermentation coincided with an increase in TTA as well as changes in the TSS values. Using the numerical multi-response optimisation of three investigated responses the optimal fermentation conditions were observed to be 25 °C for 54 h and a boiling time of 19 min for white maize mahewu and 29 °C for 72 h and a boiling time of 13 min for yellow maize mahewu. Thereafter white and yellow maize mahewu were prepared with the optimized conditions using different inocula (sorghum malt flour, wheat flour, millet malt flour or maize malt flour) and the pH, TTA and TSS of the derived mahewu samples determined. Additionally, amplicon sequencing of the 16S rRNA gene was used to characterise the relative abundance of bacterial genera in optimized mahewu samples, malted grains as well as flour samples. Major bacterial genera observed in the mahewu samples included Paenibacillus, Stenotrophomonas, Weissella, Pseudomonas, Lactococcus, Enterococcus, Lactobacillus, Bacillus, Massilia, Clostridium sensu stricto 1, Streptococcus, Staphylococcus, Sanguibacter, Roseococcus, Leuconostoc, Cutibacterium, Brevibacterium, Blastococcus, Sphingomonas and Pediococcus, with variations noted for YM mahewu and WM mahewu. As a result, the variations in physicochemical properties are due to differences in maize type and modification in processing conditions. This study also discovered the existence of variety of bacterial that can be isolated for controlled fermentation of mahewu.