The judge said that after 9/11, Kerik "in many ways acted in the highest tradition of a public servant." But then, he added, "The fact that Mr. Kerik would use that event for personal gain and aggrandizement is a dark place in the soul for me."
He said some of the crimes were committed while Kerik was "the chief law enforcement officer for the biggest and grandest city this nation has."
U.S. Attorney Preet Bharara said, "It is a very sad day when the former commissioner of the greatest police department in the world is sentenced to prison for base criminal conduct."
Kerik, a protege of former Mayor Rudolph Giuliani, pleaded guilty in November to eight felonies, including tax fraud and lying to the White House while being vetted for the Homeland Security post in 2004.
The judge said Kerik, 54, made "a conscious decision to essentially lie to the President of the United States to get a Cabinet position."
Kerik told the judge he had "become a better person."
"I know I must be punished," he said before being sentenced. "I only ask that you allow me to return to my wife and two little girls as soon as possible." His daughters are 7 and 9 years old.
When the four-year sentence was imposed, Kerik stared straight ahead, showing no emotion.
Kerik had been free on bond and under house arrest since pleading guilty. Prosecutors asked that he be sent straight to jail on Thursday, but the judge allowed him to return home while a prison is selected for him and to surrender voluntarily on May 17.
The conditions of his release, including wearing an electronic monitoring device, continue.
Kerik spent three weeks at the Westchester County Jail last fall when Robinson said he had released secret pretrial information that could influence a jury pool. While in jail, Kerik voluntarily spent 10 days in the psychiatric ward for observation because of stress. Doctors concluded he did not need mental care.
As Kerik left the courthouse Thursday for his home in Franklin Lakes, N.J., he read a statement apologizing to the nation and hoping that history will judge him "for 30 years of service I've given to the country and the city of New York."
Kerik had already been ordered to pay $188,000 in restitution and to pay past-due taxes and penalties on six years of tax returns.
Prosecutor Michael Bosworth said in court that Kerik had not yet paid anything. Defense lawyer Michael Bachner said Kerik was working "diligently" with a CPA and would comply.
The judge said people like Kerik who enter public service face a dilemma because public service does not come with "financial remuneration" and they don't become as well-off as some of their friends.
"There comes a point where everyone who faces that dilemma has to make some fundamental choices," Robinson said. When Kerik reached that point, the judge said, "He made some really bad choices."
Kerik supporters sent dozens of letters to the judge praising his bravery and kindness and urging a lenient sentence. Giuliani, who was a prospective presidential candidate when Kerik was indicted in 2007, was not among them.
Giuliani's spokeswoman, Maureen Mitchell, said he had no comment.