Mucins secreted by mucous cells constitute a core part of the defense line against the invasion of pathogens. However, mucins' structure and immunological functions remain largely unknown in teleost. In this study, two typical mucins, Muc2 and Muc5ac of flounder (Paralichthys olivaceus), were cloned and their physicochemical properties, structure and conservation were analyzed. Notably, specific antibodies against flounder Muc2 and Muc5ac were developed. It was verified at the gene and protein level that Muc2 was expressed in the hindgut and gills but not in the skin, while Muc5ac was expressed in the skin and gills but not in the hindgut. After flounders were immunized by immersion with inactivated Edwardsiella tarda, Muc2 and Muc5ac were significantly upregulated at both the gene expression and protein secretion levels, and Muc2+/Muc5ac+ mucous cells proliferated and increased secretion of Muc2 and Muc5ac. Moreover, Muc2 and Muc5ac exerted retention and clearance effects on E. tarda in a short period (within 1 dpi). These results revealed the characterization of fish mucins Muc2 and Muc5ac at the protein level and clarified the role of mucins as key guardians to maintain the mucus barrier, which advanced our understanding of teleost mucosal barrier.