Electrides are unique in the sense that they contain localized anionic electrons in the interstitial regions. Yet they exist with a diversity of chemical compositions, especially under extreme conditions, implying generalized underlying principles for their existence. What is rarely observed is the combination of electride state and superconductivity within the same material, but such behavior would open up a new category of superconductors. Here, we report a hexagonal Nb 5 Ir 3 phase of Mn 5 Si 3 -type structure that falls into this category and extends the electride concept into intermetallics. The confined electrons in the one-dimensional cavities are reflected by the characteristic channel bands in the electronic structure. Filling these free spaces with foreign oxygen atoms serves to engineer the band topology and increase the superconducting transition temperature to 10.5 K in Nb 5 Ir 3 O. Specific heat analysis indicates the appearance of low-lying phonons and two-gap s-wave superconductivity. Strong electron-phonon coupling is revealed to be the pairing glue with an anomalously large ratio between the superconducting gap Δ 0 and T c , 2Δ 0 /k B T c = 6.12. The general rule governing the formation of electrides concerns the structural stability against the cation filling/extraction in the channel site.