Tuberculosis (TB), caused by Mycobacterium tuberculosis, has a significant impact on global health worldwide. The development of multi-drug resistant strains that are resistant to the first-line drugs isoniazid and rifampicin threatens public health security. Rifampicin and isoniazid resistance are largely underpinned by mutations in rpoB and katG respectively and are associated with fitness costs. Compensatory mutations are considered to alleviate these fitness costs and have been observed in rpoC/rpoA (rifampicin) and oxyR’-ahpC (isoniazid). We developed a framework (CompMut-TB) to detect compensatory mutations from whole genome sequences from a large dataset comprised of 18,396 M. tuberculosis samples. We performed association analysis (Fisher’s exact tests) to identify pairs of mutations that are associated with drug-resistance, followed by mediation analysis to identify complementary or full mediators of drug-resistance. The analyses revealed several potential mutations in rpoC (N = 47), rpoA (N = 4), and oxyR’-ahpC (N = 7) that were considered either ‘highly likely’ or ‘likely’ to confer compensatory effects on drug-resistance, including mutations that have previously been reported and validated. Overall, we have developed the CompMut-TB framework which can assist with identifying compensatory mutations which is important for more precise genome-based profiling of drug-resistant TB strains and to further understanding of the evolutionary mechanisms that underpin drug-resistance.