WASHINGTON—On the day before President Barack Obama gave a highly anticipated speech on the National Security Agency, White House officials rushed to include additional surveillance restrictions to address concerns of privacy advocates and the president's own review panel, said people familiar with the process.

In one significant change made in the final hours before the Jan. 17 speech, White House officials decided the president would require the NSA to obtain a court order each time it searched its database of information...