The eye of vertebrates is constantly faced with numerous challenges from aquatic or airborne pathogens. As a crucial first line of defense, the ocular mucosa (OM) protects the visual organ from external threats in vertebrates such as birds and mammals. However, the understanding of ocular mucosal immunity in early vertebrates, such as teleost fish, remains limited, particularly concerning their resistance to bacterial infections. To gain insights into the pivotal role of the OM in antibacterial immunity among teleost fish, we developed a bacterial infection model using Flavobacterium columnare in rainbow trout (Oncorhynchus mykiss). Here the qPCR and immunofluorescence results showed that F. columnare could invade trout OM, suggesting that the OM could be a primary target and barrier for the bacteria. Moreover, immune-related genes (il-6, il-8, il-11, cxcl10, nod1, il1-b, igm, igt, etc.) were upregulated in the OM of trout following F. columnare infection, as confirmed by qPCR, which was further proved through RNA-seq. The results of transcriptome analyses showed that bacterial infection critically triggers a robust immune response, including innate, and adaptive immune-related signaling pathways such as Toll-like, NOD-like, and C-type lectin receptor signaling pathway and immune network for IgA production, which underscores the immune role of the OM in bacterial infection. Interestingly, a substantial reduction in the expression of genes associated with visual function was observed after infection, indicating that bacterial infection could impact ocular function. Overall, our findings have unveiled a robust mucosal immune response to bacterial infection in the teleost OM for the first time, providing valuable insights for future research into the mechanisms and functions of ocular mucosal immunity in early vertebrate species.