Transition metal sulfides have been widely studied as electrocatalysts for the hydrogen evolution reaction (HER). Though elemental doping is an effective way to enhance sulfide activity for HER, most studies have only focused on the effect of doping sulfide edge sites. Few studies have investigated the effect of doping the basal plane or the effect of doping concentration on basal plane activity. Probing the dopant concentration dependence of HER activity is challenging due to experimental difficulties in controlling dopant incorporation. Here, we overcome this challenge by first synthesizing doped transition metal oxides and then sulfurizing the oxides to sulfides, yielding core/shell Co-doped WS2/W18O49 nanotubes with a tunable amount of Co. Our combined density functional theory (DFT) calculations and experiments demonstrate that the HER activity of basal plane WS2 changes non-monotonically with the concentration of Co due to local changes in the binding energy of H and formation energy of S-vacancies. At an optimal Co doping concentration, the overpotential to reach -10 mA/cm2 is reduced by 210mV, and the Tafel slope is reduced from 122 to 49 mV per decade (mV/dec) compared to undoped WS2 nanotubes.