Graphene has attracted great attention due to its large specific surface area, high charge carrier mobility, and excellent electrical conductivity. However, the inherent structural integrity and zero bandgap characteristics of graphene limit its gas sensing properties. Consequently, researchers have embarked on exploring avenues such as doping graphene or using graphene oxide as a gas-sensitive material to design gas sensors that respond optimally to ammonia. This work, based on first-principle density functional theory, focuses on the field of ammonia gas sensors, investigating in detail the adsorption characteristics of ammonia molecules on graphene oxide (GO) and graphene oxide doped with Ag and Cu (AgGO, CuGO). By calculating parameters including charge distribution, density of states, band structures, and adsorption energy, this work delves into the influences of diverse oxygen-containing groups and metal doping on the gas sensing properties of graphene oxide. The research results show that there is a substantial charge density overlap between the density of states of hydroxyl groups in graphene oxide and NH3 molecules, indicating a clear tendency towards chemical adsorption. It is particularly noteworthy that after NH3 adsorption, the graphene oxide containing hydroxyl shows the highest charge transfer (0.078e) and adsorption energy (0.60 eV), which indicates that the adsorption efficacy of NH3 is higher, followed by carboxyl groups and epoxy groups, which mainly participate in physical adsorption. Furthermore, this work delves into the influence of metal doping on graphene oxide, demonstrating that the adsorption capability of doped graphene oxide hinges upon the synergistic influence of oxygen-containing groups and metal atoms, with Ag-doped graphene oxide showing a several-fold increase in adsorption energy. Through the analysis of density of states, it is found that Ag atoms resonate with s, p, and d orbitals of the N atom in NH3, proving the formation of a chemical bond between Ag atom and N atom. Moreover, a comparative analysis shows that Cu-doped graphene oxide (CuGO) has an increased charge transfer of about 0.020e and slightly higher adsorption energy than Ag-doped graphene oxide (AgGO) when adsorbing NH3. Intriguingly, under the same doping concentration, CuGO exhibits superior adsorption performance to NH3. It is worth noting that in graphene oxide doped with Ag or Cu, the adsorption mechanism of carboxyl and epoxy groups transforms from physical adsorption into chemical adsorption, while the hydroxyl groups maintain consistent chemical adsorption properties before and after doping. This indicates that doping with Ag or Cu atoms can significantly enhance the adsorption capability of graphene oxide to NH3.