Yellowstone National Park was the first national park in the world . It was created on March 1 , 1872 when United States President Ulysses S. Grant signed a law to create it . Yellowstone National Park , established by the U.S. Congress and signed into law by President Ulysses S. Grant on March 1 , 1872 , is a national park located primarily in the U.S. state of Wyoming , though it also extends into Montana and Idaho .