Gravitational waves (GWs) originated from mergers of stellar-mass binary black holes (SBBHs) are considered as dark sirens in cosmology since they usually do not have electromagnetic counterparts. In order to study cosmos with these events, we not only need the luminosity distances extracted from GW signals, but also require the redshift information of sources via, say, matching GW sky localization with galaxy catalogs. Based on such a methodology, we explore how well decihertz GW detectors, DO-Optimal and DECIGO, can constrain cosmological parameters. Using Monte-Carlo simulated dark sirens, we find that DO-Optimal can constrain the Hubble parameter to σ H0 /H 0 0.2% when estimating H 0 alone, while DECIGO performs better by a factor of 6 with σ H0 /H 0 0.03%. Such a good precision of H 0 will shed light on the H 0 tension. For multiple-parameter estimation, DECIGO can still reach a level of σ H0 /H 0 5%. The reason why decihertz detectors perform well is explained by their large numbers of SBBH GW events with good distance and angular resolution.