This sounds very much like My Side of the Mountain by Jean Craighead George.

Sam Gribley is a 12-year-old boy who intensely dislikes living in his parents' cramped New York City apartment with his eight brothers and sisters. He decides to run away to his great-grandfather's abandoned farm in the Catskill Mountains to live in the wilderness. The novel begins in the middle of Sam's story, with Sam huddled in his treehouse home in the forest during a severe blizzard. Frightful, Sam's pet peregrine falcon, and The Baron, a weasel, share the home with him. In flashback, Sam reminisces about how he came to be there.
Sam heard about his grandfather's abandoned farm near Delhi, New York, learned wilderness survival skills by reading a book at the New York City Public Library, and how Sam's father permitted him to go to Delhi so long as Sam let people in the town know that he is staying at the farm. Unable at first to locate the farm, Sam tries to survive on his own but finds his skills are not up to the task. He meets Bill, a man living in a cabin in the woods, who teaches him how to make a fire. Sam goes into town, and is told where his grandfather's land is. Sam finds the farm, but discovers the farmhouse is no longer standing.
Sam forages for edible plants and traps animals for food. He uses fire to make the interior of the hollow tree bigger. Seeing a peregrine falcon hunting for prey, Sam decides he wants a falcon as a hunting bird. Sam goes to town and reads up on falconry at the local public library. He steals a chick from a falcon's nest and names the bird Frightful. Later, Sam hides in the woods for two days after a forest ranger, spotting the smoke from Sam's cooking fire, came to investigate.
In the fall, Sam makes a box trap to catch animals to eat, and catches a weasel. Sam calls the weasel The Baron for the regal way the animal moves about. When a poacher illegally kills a deer, Sam steals the carcass, smokes the meat, and tans the hides. Frightful proves very good at hunting. Sam prepares for winter by hunting, preserving wild grains and tubers, smoking fish and meat, and preparing storage spaces in hollowed-out trunks of trees. Finding another poached deer, Sam makes himself deerskin clothing to replace his worn-out clothes. Sam notices a raccoon digging for mussels in the creek, and learns how to hunt for shellfish.