The spread of incurable diseases, especially infectious diseases caused by antibiotic-resistant bacteria and certain cancers, has become a serious public health concern. Consequently, the search for potent drug scaffolds has played an essential role in drug lead discovery. The multicomponent reaction (MCR) offers a novel method for efficient synthesis. It is rapidly evolving and is important for the discovery of novel molecules. We synthesized four dihydropyrimidinone (DHPM) derivatives with the one-pot MCR method, obtaining compounds 1-4. According to the NMR spectra analyses, compound 3 is a new derivative. In this experiment, we optimized the pH of the process. Based on the results, 1-4 had yields of 66.6, 72.9, 35.9, and 69.0%, respectively, at a pH of 4. In contrast, all yields significantly rose by 79.4, 91.9, 81.7, and 84.0% at pH 5. A pH of 5 was therefore advantageous for getting a high yield from these reactions. Compound 1 showed a significant inhibition against E. coli with an MIC value of 12.5 µg/mL with moderate activity against the breast cancer cell lines T47D and 4T1. Compound 3 was the most potent against S. aureus, with an MIC value of 25 µg/mL.