Astaxanthin n-octanoic acid diester (AOD) is a type of astaxanthin connecting medium-chain fatty acids with a more stable structure. In this study, we examined the role of AOD in ameliorating insulin resistance (IR) induced by a high-fat and high-sucrose diet (HFD) as well as its effect on modulating gut microbiota in mice, with free astaxanthin (AST) as a comparison. Four groups of male C57BL/6J mice (6 weeks old; n = 10 per group) were fed with a normal control diet (NC), HFD orally administered with AOD, AST (50 mg/kg body weight), or vehicle for 8 weeks. AOD improved glucose tolerance, IR, systematic and intestinal inflammation, and intestinal integrity better than AST. Further, both AOD and AST modulated gut microbiota. A significantly higher abundance of Bacteroides and Coprococcus was found in AOD than in AST, and the predicted pathway of carbohydrate metabolism was significantly impacted by AOD. Overall, AOD may play a role in alleviating IR and inflammation with the modulating effect on microbiota in HFD-fed mice. Our findings could facilitate the development of AOD as a bioactive nutraceutical and more stable alternative to AST.