The ocelot ranges from the southwestern United States to northern Argentina, up to an elevation of 3,000 m (9,800 ft). It inhabits tropical forests, thorn forests, mangrove swamps and savannas. A 2019 study in the Brazilian Amazon showed that it prefers habitats with good availability of prey and water, and tends to avoid other predators. It favors areas with dense forest cover and water sources, far from roads and human settlement, avoiding steep slopes and highly elevated areas due to lack of prey. In areas where ocelots coexist with larger predators such as the cougar and human beings, they may tune their active hours to avoid them, and seek dense cover to avoid competitors. It can adapt well to its surroundings; as such, factors other than the aforementioned are not significant in its choice of habitat.
It shares a large part of its range with the jaguar, jaguarundi, margay, oncilla, and cougar.
The ocelot is usually solitary and active mainly during twilight and at night. Radio collared individuals in the Cocha Cashu Biological Station in Peru rested during the day and became active earliest in the late afternoon; they moved between 3.2 and 17 hours until dawn and then returned to their dens.
During the daytime, it rests on trees, in dens below large trees or other cool, sheltered sites on the ground. It is agile in climbing and leaping, and escapes predators by jumping on trees. It is also an efficient swimmer. It scent-marks its territory by spraying urine. The territories of males are 3.5–46 km2 (1 1⁄4–17 3⁄4 sq mi) large, while those of females cover 0.8–15 km2 (1⁄4–5 3⁄4 sq mi). Territories of females rarely overlap, whereas the territory of a male includes those of two to three females. Social interaction between sexes is minimal, though a few adults have been observed together even in non-mating periods, and some juveniles interact with their parents. Data from camera trapping studies confirm that several ocelot individuals deposit scat in one or several communal sites, called latrines. The ocelot can be aggressive in defending its territory, fighting even to death.
The population density of ocelots has been observed to be high in areas with high rainfall, and tend to decrease with increasing latitude; highest densities have been recorded in the tropics. In 2014, the ocelot population density in Barro Colorado Island was estimated to be 1.59–1.74/km2 (4.1–4.5/sq mi), greater than 0.984/km2 (2.55/sq mi) recorded in northwestern Amazon in Peru in 2010, which was the densest ocelot population recorded thus far.
Predators of the ocelot in Texas include bobcats, cougars, coyotes, large raptors, feral dogs, wild boar, American alligators, pit vipers, and human beings.
Ocelots have been observed to follow scent trails to acquire prey. They walk slowly at a speed of about 0.3 km/h (0.2 mph) searching for prey. Alternatively, an ocelot may wait for prey for 30 to 60 minutes at a certain site, and move to another walking at 0.8–1.4 km/h (0.5–0.9 mph) if unsuccessful. An ocelot typically prefers hunting in areas with vegetation cover, avoiding open areas, especially on moonlit nights, so as not to be seen by the prey. As a carnivore, it preys on small terrestrial mammals such as rodents, lagomorphs, armadillos, opossums, and also fish, insects, reptiles and small birds. It usually feeds on the kill immediately, but removes bird feathers before. It typically preys on animals that weigh less than 1 kg (2 lb 3 oz), but rarely targets large ungulates such as deer and sheep, and peccaries. An ocelot requires 600–800 g (21–28 oz) of food every day to satisfy its energy requirements.
Primates prevail in the diet of ocelots in southeastern Brazil, and iguanas in a tropical deciduous forest in Mexico. The composition of the diet varies by season; in Venezuela, ocelots were found to prefer iguanas and rodents in the dry season and then switch to land crabs in the wet season. In southeastern Brazil, ocelots have a similar prey preference as margays and oncillas. The oncillas focus on tree-living marsupials and birds while the margays are not as selective.
Both male and female ocelots produce a long-range "yowl" in the mating season as well as a short-range "meow". Ocelots can mate any time during the year. The peak mating season varies geographically; in Argentina and Paraguay peaks have been observed in autumn, and in Mexico and Texas in autumn and winter. Oestrus lasts four to five days, and recurs every 25 days in a non-pregnant female. A study in southern Brazil showed that sperm production in ocelots, margays and oncillas peaks in summer. Captive ocelots spend more time together when mating; both scent-mark extensively and eat less during this time. Breeding ocelots in captivity is often difficult.
A litter of one to three is born after a gestational period of two to three months. Females give birth in dens, usually located in dense vegetation. A newborn kitten weighs 200–340 g (7–12 oz). The kitten is born with spots and stripes, though on a gray background; the color changes to golden as the ocelot grows older. A study in southern Texas revealed that a mother keeps a litter in a den for 13 to 64 days, and shifts the young to two or three dens. The kitten's eyes open 15 to 18 days after birth. Kittens begin to leave the den at the age of three months. They remain with their mother for up to two years, and then start dispersing and establishing their own territory. In comparison to other felids, ocelots have a relatively longer duration between births and a narrow litter size. Captive ocelots live for up to 20 years.
Throughout its range, the ocelot is threatened by loss and fragmentation of habitat. In Texas, the fertile land that supports dense cover and constitutes the optimum habitat for the ocelot is being lost to agriculture. The habitat is often fragmented into small pockets that cannot support ocelots well, leading to deaths due to starvation. Traffic accidents have emerged as a major threat over the years as ocelots try to expand beyond their natural habitat to new areas and get hit by vehicles. In the Atlantic Forest in northeastern Argentina, it is affected by logging and poaching of prey species.
The fur trade was a flourishing business in the 1960s and the 1970s that resulted in severe exploitation of felids such as the ocelot and the jaguar. In the 1960s, ocelot skins were among the most highly preferred in the US, reaching an all-time high of 140,000 skins traded in 1970. This was followed by prohibitions on commercial trade of spotted cat skins in several range states such as Brazil and the US, causing ocelot skins in trade to plummet. In 1986, the European Economic Community banned import of ocelot skins, and in 1989, the ocelot was included in Appendix I of the Convention on International Trade in Endangered Species of Wild Fauna and Flora. However, hunting of ocelots for skins has continued and is still a major threat to ocelot survival.
Another threat has been the international pet trade; this typically involves capturing ocelot kittens by killing their mothers; these cats are then sold to tourists. Though it is banned in several countries, pet trade survives; in some areas of Central and South America ocelots are still sold in a few local markets.
The ocelot is listed as Least Concern on the IUCN Red List because of its wide distribution in the Americas. As of 2013, the global population was estimated at more than 40,000 mature individuals, with stable populations in some Amazon basin areas. As of 2012, the ocelot population in Argentina's subtropical regions was estimated to consist of 1,500 to 8,000 mature individuals. It has been recorded in oil palm landscapes and big cattle ranches in the Colombian Llanos and inter-Andean valleys. In Texas and northeastern Mexico, ocelot populations have reduced drastically; as of 2014, the population in Texas is estimated to be 50–80 individuals. The reduced numbers have led to increased inbreeding and low genetic diversity.
Ocelot hunting has been banned in Argentina, Brazil, Bolivia, Colombia, Costa Rica, French Guiana, Guatemala, Honduras, Mexico, Nicaragua, Panama, Paraguay, Suriname, Trinidad and Tobago, United States, Uruguay, and Venezuela; regulations have been placed on hunting in Peru. The US Fish and Wildlife Service, the Texas Parks and Wildlife Department and The Nature Conservancy are among agencies actively involved in ocelot conservation efforts, such as the protection and regeneration of vegetation in the Rio Grande Valley.
The American Zoo and Aquarium Association established a Species Survival Plan for the Brazilian ocelot. In 2006, the captive population in North American zoos consisted of 16 ocelots representing six founders and their offspring. Some litters were produced using artificial insemination. The Emperor Valley Zoo in Trinidad keeps foremost confiscated and trapped ocelots.
Ocelots have been associated with humans since the time of the Aztec and Incan civilizations, who depicted ocelots in their art and mythology. Ocelot bones were made into thin, pointed instruments to pierce ears and limbs for ritual bloodletting. Several figurines depicting ocelots and similar felids are known. In her 1904 work A Penitential Rite of the Ancient Mexicans, archaeologist Zelia Nuttall described a statue depicting an ocelot or a tiger excavated in Mexico City and its relation to the Aztec deity Tezcatlipoca. She argued that the sculpture depicted an ocelot, writing,
Moreover, she described a photograph of a seated person to corroborate her claim:
Like many other felids, ocelots are occasionally kept as pets. They might demand a lot of attention from their owners and have a tendency to chew on or suck on objects, such as fabric and the fingers of their owners; this can lead them to accidentally ingest objects like tennis balls. Agile and playful, pet ocelots can be troublesome to keep due to their habit of leaping around and potentially damaging objects; ocelots may unintentionally injure their owners with bites. Nevertheless, carefully raised ocelots can be highly affectionate. Painter Salvador Dalí kept a pet ocelot named Babou that was seen with him at many places he visited, including a voyage aboard SS France. When one of the diners at a New York restaurant was alarmed by the ocelot, Dali told her that it was a common domestic cat that he had "painted over in an op art design". Opera singer Lily Pons and musician Gram Parsons are also known to have kept ocelots.