David A. Stockman, the former budget director known for his impulsive candor, has sold his memoirs to Harper & Row for more than $2 million.

The hefty price tag is the latest (and greatest) in recent publishing bidding wars, which have driven prices for memoirs by public officials such as House Speaker Thomas P. (Tip) O'Neill Jr. and former U.N. ambassador Jeane Kirkpatrick to remarkable heights.

The contract also makes Stockman a very rich man in a hurry. He resigned his $75,100-a-year Cabinet post last month to join the New York investment firm of Salomon Bros. for a reported annual salary of nearly $1 million.

After personally negotiating with a dozen publishing houses, Stockman settled on Harper & Row by late Friday, two days after he departed the Office of Management and Budget. He apparently held off closing the deal until he was no longer on the government payroll.

Those familiar with Stockman's book proposal say that while it won't be a lecture in economics, it will fall shy of an unabashed kiss-and-tell.

Newsweek reported this week that several White House officials, including chief of staff Donald P. Regan, have warned Stockman against being too candid in his book. However, Stockman is known to have intense professional and personality differences with certain officials, such as Defense Secretary Caspar Weinberger, which the publisher would almost certainly expect to have addressed in a $2 million book.

"David Stockman has the unusual ability not only to understand the issues in a deep-seated political and economic sense . . . He also has been a central player in all the policy decisions of the Reagan administration," said economist Alan Greenspan. "He knows where all the buttons are. He knows all the players. I suspect some of them might be a trifle nervous."

In fact, Stockman's freewheeling public statements in the past few years often put him under fire within the administration. Recently he angered the military establishment by declaring it more concerned with its retirement benefits than with protecting the security of the American people.

But his darkest hour came in 1981 when The Atlantic published an article quoting him acknowledging private misgivings about the basic philosophies of "Reaganomics" he had championed in public.

In recent days, since he announced his resignation, Stockman had taken to tweaking his colleagues about the book.

"I'm going to put this in my book, you know," he joked at a meeting with White House staff members recently, according to sources in the room.

Stockman was unavailable for comment yesterday. However, a Harper & Row press release quoted him as saying: "I am very pleased with my selection of Harper & Row as the publisher of my book and look forward to working with one the nation's finest publishing houses."

There was an unusually tight lid yesterday on information regarding the book. According to someone close to the negotiations, Stockman had specifically requested that people associated with the project refrain from talking about it.

Stockman plans to begin writing the book this summer and have it completed by Nov. 1, when he assumes his new position at Salomon Bros.

Asked last week how he could possibly finish the book for an anticipated spring 1986 publication date, Stockman quipped: "Fast writer."

During his four years with the Reagan administration, Stockman has taken copious notes on yellow legal paper during Cabinet, budget and congressional meetings. The former budget director is known to be a skilled writer, and a source close to him says he plans to write the entire book himself.

According to those familiar with the outline, the book will describe Stockman's thoughts on why the administration's economic plan resulted in an unprecedented deficit, plus his personal experiences and a formula for the future.

In his book, Stockman probably will attempt to vindicate himself as he leaves the biggest federal debt in American history.

At a White House going-away reception for Stockman last week, Stockman presented President Reagan with his calculator, saying, "I want you to know that I found out today, the subtract key doesn't work."