WASHINGTON — When President Obama sent his inaugural Twitter post from the Oval Office on Monday, the White House heralded the event with fanfare, posting a photograph of him perched on his desk tapping out his message on an iPhone.

The @POTUS account — named for the in-house acronym derived from “President of the United States” — would “serve as a new way for President Obama to engage directly with the American people, with tweets coming exclusively from him,” a White House aide wrote that day.

But it took only a few minutes for Mr. Obama’s account to attract racist, hate-filled posts and replies. They addressed him with racial slurs and called him a monkey. One had an image of the president with his neck in a noose.

The posts reflected the racial hostility toward the nation’s first black president that has long been expressed in stark terms on the Internet, where conspiracy theories thrive and prejudices find ready outlets. But the racist Twitter posts are different because now that Mr. Obama has his own account, the slurs are addressed directly to him, for all to see.