We present a search for the production of a heavy gauge boson, W′, that decays to third-generation quarks, by D0 Collaboration in pp¯ collisions at s=1.96 TeV. We set 95% confidence level upper limits on the production cross section times branching fraction. For the first time, we set limits for arbitrary combinations of left- and right-handed couplings of the W′ boson to fermions. For couplings with the same strength as for the standard model W boson, we set the following limits, assuming that there are right-handed neutrinos νR for all three generations with M(W′)>m(νR): M(W′)>863 GeV for purely left-handed couplings, M(W′)>885 GeV for purely right-handed couplings, and M(W′)>916 GeV if both left- and right-handed couplings are present. The limit for right-handed couplings improves for M(W′)m(νR) to M(W′)>890 GeV.