Catalyzes the hydrolysis of acyl-CoAs into free fatty acids and coenzyme A (CoASH), regulating their respective intracellular levels (PubMed:10944470, PubMed:16940157). Displays higher activity toward long chain acyl CoAs (C14-C20) (PubMed:10944470, PubMed:16940157). The enzyme is involved in enhancing the hepatic fatty acid oxidation in mitochondria (By similarity). {ECO:0000250|UniProtKB:Q9QYR9, ECO:0000269|PubMed:10944470, ECO:0000269|PubMed:16940157}. This is the function of ACOT2 (acyl-CoA thioesterase 2, ENSG00000119673).