An NYPD cop accidentally shot himself in the hand in a Brooklyn police station late Thursday night, police said.

The officer was inside the PSA 1 station in Coney Island when he accidentally fired his gun and grazed his hand just before midnight, cops said.

He was rushed to NYU Langone Hospital to be treated for the graze wound, authorities said.

Police sources said his injury was minor and he’s expected to be discharged from the hospital Friday.