Optical nanowire lasers are a new generation of lasers: lateral scales are much smaller than wavelengths. Unidirectional nanowire lasers are ideal for most laser powers because energy is concentrated in one direction. Since the lateral dimension is smaller than the wavelength, energy will propagate outside the core. As a result, conventionally prepared lasers have a large amount of reflection. Here, we propose a simple and effective method to achieve unidirectionality. A terahertz quantum cascade laser with a distributed feedback grating was chosen as the platform for the optical nanowire laser. The unidirectionality was experimentally 1 to 8, and the power of the two-way distributed feedback Bragg laser was 1.8 times higher.