In "Atlas Shrugged", Ayn Rand, during John Galt's speech, has him state: "If I were to speak your kind of language, I would say that man's only moral commandment is: Thou shalt think. But a 'moral commandment' is a contradiction in terms. The moral is the chosen, not the forced; the understood, not the obeyed. The moral is the rational, and reason accepts no commandments."
Every "ought" implies an "if". If you want to be a doctor, you ought to go to medical school. If you want to have a happy marriage, you ought not lie to your spouse. If you want to succeed, you ought to be rational. In other words, there are many things that might be considered a moral imperative in the sense that they tell you what you ought to do. However, the imperative is always conditional---the "ought" clause holds imperative power only insofar as the "if" clause is true.
Does the if-ought relationship render morality hopelessly subjective? Why, one might reasonably ask, should I want to have a happy marriage, and what sway would the moral imperative have over me if I do not? However, a moment of thought will reveal a number of reasons, each themselves if-ought propositions, that create a new imperative supporting the original imperative. For example, “I should want a happy marriage because it would contribute to my spiritual well-being." Thus the original if-ought pair could be rewritten "if I want to contribute to my spiritual well-being, I ought not lie to my wife." But why should I want to contribute to my spiritual well-being? And so on. . .
This very rough sketch is meant to illustrate how every moral imperative rests on still another moral imperative, which itself rests on another imperative—each one a conditional imperative in the form of an if-ought pair. Some argue that this leads to an infinite regress, and thus morality is just a subjective choice with no factual basis. Others seek to stop the regress by postulating a super-natural power that forms the bottom upon which all other imperatives rest—such as God’s will.
Rand was the first (as far as I know) who realized that morality could be grounded in facts. She realized that all of morality came down, ultimately, to one “if” clause for which no deeper justification could be sought--if you want to live. Rand’s ethics are built upon this. Thus, if you want to live, then you must be rational. If you want to live, then you must be productive. If you want to live, then you must be independent. And so on. While still in the form of an “if” proposition, this nonetheless stops the infinite regress, because no deeper justification can be sought. If you don’t want to live, then value is meaningless and so is morality. Morality presupposes that you want to live. There is no imperative that you must live. But if you do not want to live, then you do not need morality, values, guidance, thought, or anything else.
Thus, I think “if you want to live” is the basic “moral imperative” of objectivism, but perhaps not in the sense that others use the term. Figuring out what exactly the "ought" clauses that match "if you want to live" are is a difficult task, which is based on observations of the facts of reality--a task that, thankfully, Rand did much of for us. One such "ought" that is more fundamental than many (perhaps all) others is the one identified in the answer above--if one wants to live, then one ought to think.