Riemerella anatipestifer is a pathogenic bacterium that causes duck serositis and meningitis, leading to significant harm to the duck industry. To escape from the host immune system, the meningitis‐causing bacteria must survive and multiply in the bloodstream, relying on specific virulence factors such as capsules. Therefore, it is essential to study the genes involved in capsule biosynthesis in R. anatipestifer. In this study, we successfully constructed gene deletion mutants Δ3820 and Δ3830, targeting the GE296_RS03820 and GE296_RS03830 genes, respectively, using the RA‐LZ01 strain as the parental strain. The growth kinetics analysis revealed that these two genes contribute to bacterial growth. Transmission and scanning electron microscopy (TEM and SEM) and silver staining showed that Δ3820 and Δ3830 produced the altered capsules and compounds of capsular polysaccharides (CPSs). Serum resistance test showed the mutants also exhibited reduced C3b deposition and decreased resistance serum killing. In vivo, Δ3820 and Δ3830 exhibited markedly declining capacity to cross the blood–brain barrier, compared to RA‐LZ01. These findings indicate that the GE296_RS03820 and GE296_RS03830 genes are involved in CPSs biosynthesis and play a key role in the pathogenicity of R. anatipestifer. Furthermore, Δ3820 and Δ3830 mutants presented a tendency toward higher survival rates from RA‐LZ01 challenge in vivo. Additionally, sera from ducklings immunized with the mutants showed cross‐immunoreactivity with different serotypes of R. anatipestifer, including 1, 2, 7 and 10. Western blot and SDS‐PAGE assays revealed that the altered CPSs of Δ3820 and Δ3830 resulted in the exposure of some conserved proteins playing the key role in the cross‐immunoreactivity. Our study clearly demonstrated that the GE296_RS03820 and GE296_RS03830 genes are involved in CPS biosynthesis in R. anatipestifer and the capsule is a target for attenuation in vaccine development.