The beneficial action of nonsteroidal anti-inflammatory drugs (NSAIDs) is associated with the inhibition of cyclooxygenase-2 (COX-2), whereas their harmful side effects are associated with the inhibition of COX-1. In order to understand a meaningful comparison of both classical NSAIDs and newer COX-2 drugs, a series of molecules from varied classes of COX-2 inhibitors was studied by the application of three-dimensional quantitative structure-activity relationships (3D-QSAR) using molecular descriptors obtained by genetic function approximation. The features responsible for the dual inhibition of COX-1 and COX-2 and the selective inhibition of COX-2 with factors contributing to the maintenance of optimum selectivity were identified. The QSAR models revealed the importance of thermodynamic, electronic, structural, and molecular shape analysis parameters, which can reasonably modulate the selectivity pattern to avoid unsolicited side effects. An improved understanding to rationalize the COX-1 and COX-2 binding profiles could be gained to develop safe drug design methods.