Kym Andrew Walter, 25, of Kings Mill Lane in the town, is also charged with possessing a firearm, production of cannabis and abstracting electricity.
The incident happened on Springbank Road, in the early hours of Saturday.
Mr Walter was remanded in custody at the town's magistrates' court and is due at Leeds Crown Court on 27 October.
A 25-year-old man has appeared in court charged with attempted murder after a gun was fired through the window of a house in Huddersfield.