Detectives looking into the case have arrested the men on suspicion of attempted murder.
A 32-year-old man from the Wakefield area and a 25-year-old man from the Heckmondwike area were arrested on Friday night (November 8). They remain in police custody.
Two men were taken to hospital following the shooting at around 7.10pm on Huddersfield Road on November 4.
The road was closed at its junction with Lumb Lane as police investigated, while extra officers have been deployed to the area to reassure the community.
Officers at the time said a 27-year-old man and a 22-year-old man received gun-shot wounds, and were taken to hospital for treatment for serious injuries.
West Yorkshire Police's major enquiry team are continuing to investigate, and enquiries are ongoing.
Anyone with information on the shooting is asked to contact police on 101, quoting Operation Filtergate.