Horizontal gene transfer (HGT) enables novel gene establishment but has rarely been reported in the genomes of deuterostomes. Using the genomes of four amphioxi, massive HGT events were identified that introduced novel genes in different functional groups. Innate immunity of amphioxi that have no adaptative immune system was enriched by HGT genes. Anaerobic adaptation of amphioxi may have been enabled by the HGT of genes for alcohol dehydrogenase and ferredoxin. A proximally arrayed cluster of EF-hand calcium-binding protein genes, of which the copy number was linearly correlated to the sea salinity of the collection region, may foster their survival at different calcium concentrations. Combining phylogenetic analysis and conservation among deuterostomes, this comprehensive analysis of HGT in amphioxi revealed insights into the early evolution of deuterostomes.