"To Build a Fire" is a prime example of the literary movement of naturalism. Naturalism was an offshoot of Charles Darwin's and Herbert Spencer's theories on evolution. In his monumental 1859 work Origin of the Species, Darwin theorized that environments alter the biology and behavior of organisms; the organisms whose traits promote survival reproduce more successfully and adapt new, more efficient traits. Spencer applied Darwin's ideas to the human environment, and Social Darwinism became one of the dominant philosophies in the late 19th century.
Naturalists saw evolution as proof that the world is deterministic and that humans do not have free will. Since the evolutionary world is based on a series of links (each of which causes the next), any action humans make is not, as we might otherwise believe, a "first" step. Rather, the action has been caused by prior environmental, social, and biological factors beyond our individual control.
This deterministic view influenced the naturalists in a number of philosophical areas. Since humans do not have free will, the naturalists refrained from making moral judgments on the actions of their characters; after all, the environment, and not the human, has determined these actions. The naturalists also viewed the deterministic environment as indifferent and harsh to its inhabitants; accordingly, keen instinct rather than civilized intellect is necessary for survival (in "To Build a Fire," the man is lacking this instinct).
Naturalists also changed their subjects and language to reflect their ideas. The lower classes were more conducive to depicting the harsh, indifferent environment, and in "To Build a Fire," the lower-class man is trying to strike it rich in the Klondike Gold Rush. Moreover, since the naturalists believed that the deterministic world could be understood only through scientific facts, their prose style was usually more journalistic and spare.
London journeyed to the Yukon Territory in 1897 along with countless others hoping to make a score in the gold rush. In November 1897, he staked a claim in Henderson Creek, the destination of the man in "To Build a Fire." Though he left Alaska the following summer without much gold, he would draw from his rich experiences in the northern wilds for many of his lasting works, including Call of the Wild and White Fang and, of course, 1908's "To Build a Fire," usually considered his most lasting work.