Oxazine and thiazine are heterocyclic organic compounds that have a wide range of pharmacological applications. In this study, some chalcone derivatives (1–5) were synthesized based on the reaction of an equal amount of p-substituted acetophenone and terephthalaldehyde in a basic medium. Oxazine derivatives (6-10) and thiazine derivatives (11–15) are synthesized from the reactions of chalcones (1-5) with urea and thiourea, respectively, in a basic medium. The newly synthesized compounds were identified using various physical techniques like 1H-NMR and FT-IR spectra, in addition to docking analysis for some of these derivatives. Finally, these compounds were tested for their biological activity, IC50, and % of PC3 cell line viability as markers of anticancer activity.