Gunshots rang out at about 4 a.m. outside 11:11 Restaurant and Lounge in the area of West 211th Street and 10th Avenue.
Chief of Patrol Juanita Holmes said a sergeant and an officer were in the area on patrol when the sergeant took cover and fired, hittng the gunman in the hip.
All the victims were expected to recover.
The gun was recovered at the scene. It was not clear what sparked the shooting.
Earlier this month, a group of motorcyclists carjacked and assaulted a man driving a black BMW in Inwood.