Cycles of depalmitoylation and repalmitoylation critically control the steady-state localization and function of various peripheral membrane proteins, such as Ras proto-oncogene products. Interference with acylation using small molecules is a strategy to modulate cellular localization—and thereby unregulated signaling—caused by palmitoylated Ras proteins. We present the knowledge-based development and characterization of a potent inhibitor of acyl protein thioesterase 1 (APT1), a bona fide depalmitoylating enzyme that is, so far, poorly characterized in cells. The inhibitor, palmostatin B, perturbs the cellular acylation cycle at the level of depalmitoylation and thereby causes a loss of the precise steady-state localization of palmitoylated Ras. As a consequence, palmostatin B induces partial phenotypic reversion in oncogenic HRasG12V-transformed fibroblasts. We identify APT1 as one of the thioesterases in the acylation cycle and show that this protein is a cellular target of the inhibitor.