In this paper, we study the wind accretion on to a rotating black hole in a close binary system that harbours a young massive star. It is shown that the angular momentum of the accreted stellar wind material is not sufficient for the formation of an accretion disc. However, in the conditions considered, the Blanford–Znajek mechanism can be activated, and thus powerful jets can be launched in the direction of the rotation axis of the black hole. Importantly, no observational signatures of accretion, as are typically seen from the thermal X-ray emission of accretion discs, are expected in the suggested scenario. Here, the properties of the generated jet are studied numerically in the framework of a two-dimensional general relativity magnetohydrodynamical approach. Because of the accumulation of the magnetic flux at the black hole horizon, the jet power is expected to be modulated on a subsecond time-scale. Although the intervals between the jet active phases depend on the magnetic flux that escapes from the black hole horizon (which can be modelled self-consistently only using a three-dimensional code), a general estimate of the averaged jet power is obtained. It is shown that for the black hole rotation, expected in a stellar binary system (the dimensionless rotation parameter a= 0.5), approximately 5 per cent of the accreted rest energy can be channelled into the jets. In the case of the faster rotation of the black hole, the efficiency is expected to be significantly higher (e.g. for the dimensionless rotation parameter a= 0.95, the jet carries approximately 20 per cent of the accreted rest energy). In the specific case of the gamma-ray binary system LS 5039, the obtained jet luminosity can be responsible for the observed GeV radiation if Doppler boosting is invoked, which can enhance the apparent flux from the system.