When Mosby returned to Washington in 1901, during the second term of the McKinley administration (wary during the first term because of McKinley's service in the Shenandoah Valley during the Civil War, as well as being perceived as just another office-seeker), he again sought a job in the Justice Department. After McKinley's assassination, President Theodore Roosevelt instead sent Mosby west as a special agent of the Department of the Interior. There, Mosby dealt with illegal fencing of range land by cattle barons in Colorado and Nebraska, who often used fake homestead claims by military widows as well as violated the Van Wyck Fence Law of 1885. When witnesses refused to come forward to testify about illegal fencing for fear of retaliation, Mosby upheld the law by first sending notices to the affected landowner. The Pawnee Cattle Company capitulated in Colorado, so Mosby moved on to western Nebraska, where he learned the land agent actually lived in Iowa and failed to supervise the range.