Melioidosis, caused by Burkholderia pseudomallei, is a potentially lethal infection with no licensed vaccine. There is little understanding of why some exposed individuals have no symptoms, while others rapidly progress to sepsis and death, or why diabetes confers increased susceptibility. We prospectively recruited a cohort of 183 acute melioidosis patients and 21 control subjects from Northeast Thailand and studied immune parameters in the context of survival status and the presence or absence of diabetes. HLA-B*46 (one of the commonest HLA class I alleles in SE Asia) and HLA-C*01 were associated with an increased risk of death (odds ratio 2.8 and 3.1 respectively). Transcriptomic analysis during acute infection in diabetics indicated the importance of interplay between immune pathways including those involved in antigen presentation, chemotaxis, innate and adaptive immunity and their regulation. Survival was associated with enhanced T cell immunity to nine of fifteen immunodominant antigens analysed including AhpC (BPSL2096), BopE (BPSS1525), PilO (BPSS1599), ATP binding protein (BPSS1385) and an uncharacterised protein (BPSL2520). T cell immunity to GroEL (BPSL2697) was specifically impaired in diabetic individuals. This characterization of immunity associated with survival during acute infection offers insights into correlates of protection and a foundation for design of an effective multivalent vaccine.