The marine thraustochytrids are a promising source of docosahexaenoic acid (DHA) and the ketocarotenoid astaxanthin. In this study, the biosynthetic pathways of these two important metabolites in Aurantiochytrium sp. SK4 was illustrated by the analyses of the genome, transcriptome, key enzymes, and pathway products. Two sets of genes were involved in two pathways for the biosynthesis of fatty acids. The absence of Δ-15 desaturase genes and the presence of docosapentaenoic acid (DPA), up to 12% of total fatty acids suggest that Aurantiochytrium sp. SK4 may synthesize DHA mainly via a polyketide synthase (PKS) pathway. Three enzymes, namely geranyl diphosphate synthase (GPPS), farnysyl diphosphate synthase (FPPS), and geranylgeranyle diphosphate synthase (GGPPS) were found to be involved in the formation of GGPP that was subsequently catalyzed to β-carotene by a trifunctional CrtIBY enzyme. β-Carotene might be ketolated and then hydroxylated into astaxanthin based on the carotenoid profiles. The formation of GGPP was proposed to be the limiting steps for carotenoid production. Overexpression of the Archaeoglobus GPS together with the Escherichia coli isopentenyl pyrophosphate isomerase, and Vitreoscilla hemoglobin resulted in not only 1.85- and 5.02-fold increases of total carotenoids and astaxanthin, but also 2.40- and 2.74-fold increases of total fatty acids and DHA. This study provides insights into the biosynthesis of carotenoids and fatty acids in Aurantiochytrium.