Drug resistant tuberculosis is increasing world-wide. Resistance against isoniazid (INH), rifampicin (RIF), or both (multi-drug resistant TB, MDR-TB) is of particular concern, since INH and RIF form part of the standard regimen for TB disease. While it is known that suboptimal treatment can lead to resistance, it remains unclear how host immune responses and antibiotic dynamics within granulomas (sites of infection) affect emergence and selection of drug-resistant bacteria. We take a systems pharmacology approach to explore resistance dynamics within granulomas. We integrate spatio-temporal host immunity, INH and RIF dynamics, and bacterial dynamics (including fitness costs and compensatory mutations) in a computational framework. We simulate resistance emergence in the absence of treatment, as well as resistance selection during INH and/or RIF treatment. There are four main findings. First, in the absence of treatment, the percentage of granulomas containing resistant bacteria mirrors the non-monotonic bacterial dynamics within granulomas. Second, drug-resistant bacteria are less frequently found in non-replicating states in caseum, compared to drug-sensitive bacteria. Third, due to a steeper dose response curve and faster plasma clearance of INH compared to RIF, INH-resistant bacteria have a stronger influence on treatment outcomes than RIF-resistant bacteria. Finally, under combination therapy with INH and RIF, few MDR bacteria are able to significantly affect treatment outcomes. Overall, our approach allows drug-specific prediction of drug resistance emergence and selection in the complex granuloma context. Since our predictions are based on pre-clinical data, our approach can be implemented relatively early in the treatment development process, thereby enabling pro-active rather than reactive responses to emerging drug resistance for new drugs. Furthermore, this quantitative and drug-specific approach can help identify drug-specific properties that influence resistance and use this information to design treatment regimens that minimize resistance selection and expand the useful life-span of new antibiotics.