Circulating tumor cells are the key link between a primary tumor and distant metastases, but once in the bloodstream, loss of adhesion induces cell death. To identify the mechanisms relevant for melanoma circulating tumor cell survival, we performed RNA sequencing and discovered that detached melanoma cells and isolated melanoma circulating tumor cells rewire lipid metabolism by upregulating fatty acid (FA) transport and FA beta-oxidation-related genes. In patients with melanoma, high expression of FA transporters and FA beta-oxidation enzymes significantly correlates with reduced progression-free and overall survival. Among the highest expressed regulators in melanoma circulating tumor cells were the carnitine transferases carnitine O-octanoyl-transferase and carnitine acetyltransferase, which control the shuttle of peroxisome-derived medium-chain FAs toward mitochondria to fuel mitochondrial FA beta-oxidation. Knockdown of carnitine O-octanoyltransferase or carnitine acetyltransferase and short-term treatment with peroxisomal or mitochondrial FA beta-oxidation in-hibitors thioridazine or ranolazine suppressed melanoma metastasis in mice. Carnitine O-octanoyltransferase and carnitine acetyltransferase depletion could be rescued by medium-chain FA supplementation, indicating that the peroxisomal supply of FAs is crucial for the survival of nonadherent melanoma cells. Our study identifies targeting the FA-based cross-talk between peroxisomes and mitochondria as a potential therapeutic opportunity to challenge melanoma progression. Moreover, the discovery of the antimetastatic activity of the Food and Drug Administration-approved drug ranolazine carries translational potential.