Selenium (Se)-based materials for sodium (ion) batteries are currently attracting extensive attentions owing to their fast kinetics and excellent cyclability; at the same time, achieving high Se content, which is crucial to maintain the competitive edge over other kinds of electrode materials, still remains a challenge. We developed a confined annealing method which allows us to convert pristine metal-organic frameworks (MOFs) directly into selenium/selenide/carbon composites. It is a simultaneous process of carbonization, selenization and Se vapor deposition, and the combination of elemental Se and selenide results in a record-high Se content of 76 wt%, enhanced capacity and rate capability (490 and 384 mA h g−1 at 0.1 and 2.0 A g−1) exceeding most documented Se-based materials. The produced composites also exhibit excellent cycle stability (no decay for 700 cycles at 2 A g−1), which is correlated to dominant capacitive charge transport mode and the MOF-derived robust structure. Our work not only offers a proof of concept that Se content can be maximized by confining Se through both vapor deposition and chemical bonding with transition metals, but also demonstrates a general and green selenization approach without using any toxic or flammable chemicals. The introduced method will probably prevail for its wide applicability on various metal-containing precursors, and even be expanded to the fabrication of sulfur- and phosphor-based composites.