The presence of oropharyngeal human papillomavirus (HPV)-18 E6 and E7 oncoproteins is highly significant in the progression of oropharyngeal cancer. Natural flavonoid compounds have potential as photosensitizers for light-activated antimicrobial therapy against HPV-associated oropharyngeal cancer. This study evaluated five natural flavonoid glycosides including Fisetin, Kaempferol, Morin, Myricetin, and Quercetin as photosensitizers against HPV-18 E6 and E7 oncoproteins using computational methods. After obtaining the amino acid sequences of HPV-18 E6 and E7, various tools were used to predict and verify their properties. The PubChem database was then examined to identify potential natural flavonoid glycosides, followed by predictions of their drug-likeness and ADMET properties. Subsequently, molecular docking was conducted to enhance the screening accuracy and to gain insights into the interactions between the natural compounds and the active sites of HPV-18 E6 and E7 oncoproteins. The protein structures of E6 and E7 were predicted and validated to be reliable. The results of molecular docking demonstrated that Kaempferol exhibited the highest binding affinity to both E6 and E7. All compounds satisfied Lipinski's rules of drug-likeness, except Myricetin. They showed high absorption, distribution volume and similar ADMET profiles with no toxicity. In summary, natural flavonoid glycosides, especially Kaempferol, show potential as photosensitizers for antimicrobial photodynamic therapy against HPV-associated oropharyngeal cancer through inhibition of E6 and E7 oncoproteins. These findings provide insights into the development of novel therapeutic strategies based on antimicrobial photodynamic therapy.