The most catastrophic problem that affects living standards is viral infections. This work aims to discover and evaluate new antiviral agents from marine sources. Antiviral activities of n-hexane, dichloromethane, ethyl acetate, and butanol fractions of octocoralNephtheasp. were examined in vitro against Herpes simplex type I (HSV-1) and Coxsackie B4 (CoxB4) viruses using MTT assay. n-hexane fraction was the most bioactive fraction with IC50 30.23 ± 0.007g/ml on both viruses. The metabolic profiling of the n-hexane fraction was investigated as the most potent fraction via the Ultra Performance Liquid Chromatography method joined to a quadrupole time-of-flight hybrid mass spectrometer (UPLC-Q/TOF-MS), which led to the identification of twelve secondary metabolites (diterpenoid, triterpene, steroids, and fatty acids). A molecular docking investigation was supported by using Molecular Operating Environment (MOE) software to prove the mechanism of action. The highest binding energy score was for lauric acid with -10.2157 kcal/mol toward the Thymidine Kinase (TK), and Chabrolohydroxybenzoquinone G toward 3C protease (3Cpro) enzyme with -16.5115 kcal/mol. Finally, the results were confirmed by the inhibitory effect of bioactive fraction in-vitro against TK and 3Cpro enzymes. Our results highlighted Nephtheasp. as a rich source of non-polar effective constituents that might be a promising candidate for controlling viral infections.