Using a 3.19 fb-1 data sample collected at an e+e- center-of-mass energy of Ecm=4.178 GeV with the BESIII detector, we measure the branching fraction of the leptonic decay Ds+→μ+νμ to be BDs+→μ+νμ=(5.49±0.16stat±0.15syst)×10-3. Combining our branching fraction with the masses of the Ds+ and μ+ and the lifetime of the Ds+, we determine fDs+|Vcs|=246.2±3.6stat±3.5syst MeV. Using the c→s quark mixing matrix element |Vcs| determined from a global standard model fit, we evaluate the Ds+ decay constant fDs+=252.9±3.7stat±3.6syst MeV. Alternatively, using the value of fDs+ calculated by lattice quantum chromodynamics, we find |Vcs|=0.985±0.014stat±0.014syst. These values of BDs+→μ+νμ, fDs+|Vcs|, fDs+ and |Vcs| are each the most precise results to date.