Elemental segregation can pronouncedly affect the cohesion of grain boundary (GB), which shows tremendous potential in altering the thermal stability and mechanical properties of metals. In this work, we systematically investigate the segregation behavior of oxygen (O) atoms at a series of GBs in molybdenum (Mo), using first principles calculations, to reveal the effect of O segregation on the embrittlement of Mo GBs. It is found that O atoms energetically prefer to segregate at sites in both the GB core and the vicinity of the GB plane. The strengthening energy is strongly associated with the GB structure, and it linearly decreases with the continuous deformation of the GB. O segregation can lead to an increase in the volume of polyhedron sites and a decrease in the charge density among adjacent Mo atoms across the GB plane. The weakened Mo-Mo bonds are believed to disrupt the GB cohesion, thereby increasing the intergranular cleavage tendency of Mo. Interestingly, O segregation does not always trigger GB embrittlement. The Σ5(310)[001] symmetric tilt grain boundary (STGB) with an O atom doped at the cap trigonal prism (CTP) site possesses a strength as strong as the clean GB. O segregation promotes the generation of Mo-O bonds across the GB plane, which counteracts the adverse effect of weakened Mo-Mo bonds. This work deepens the understanding of the possible effect of O segregation on GB cohesion of Mo from the atomic and electronic scales, providing guidance for enhancing the mechanical properties of Mo via GB structure optimization.