Cachaça was invented by the first Portuguese settlers in Brazil, around the town of São Jorge dos Erasmos on the outskirts of São Paolo State. The Portuguese brought the sugarcane plants and the knowledge of extracting the sugar from it. Workers at local sugar mills discovered that the sugarcane juice (garapa), cooked and left standing, would "sour" (ferment) and turn into a mild alcoholic beverage. The product, disparagingly named cagaça, was consumed by slaves as a cheap substitute for the Indians's cauim, a beverage made from fermented maize. Soon, someone had the idea of distilling it, and thus cachaça was born.

Cachaça distilleries multiplied throughout colonial Brazil during the 16th and 17th centuries. Portugal eventually took notice and, in order to protect the market for Portuguese-made grappa (bagaceira), tried several times to outlaw the manufacture and consumption of the new spirit. In 1756, after a century of failure to suppress it, the Portuguese Crown gave up and instead levied a duty on cachaça. A major factor in this decision to tax rather than prohibit was the Lisbon earthquake of 1755, which had devastated the city. The tax brought substantial revenue to the Treasury, and contributed to the rebuilding of Lisbon.

There are currently more than 4,000 different brands of cachaça available in Brazil, with the most prized brands produced in the areas of São Paulo, Ceará, Pernambuco, and Minas Gerais.

Cane is generally harvested 12 months after planting - usually between June and December, as this is when sugar levels are highest. Within 24 hours of cutting, the cane is crushed, and the raw sugarcane juice, garapa, is collected in a container. Traditionally it is then mixed with a fubá (‘starter’) of corn flour, although this is now usually not the case with mass-produced cachaças. The resulting mixture is left to ferment and is then distilled through column or pot stills, depending on the style. The cachaca is then either put into barrels for ageing or bottled immediately. Up to 6 g/l of sugar may be added; cachaça which has between 6 and 30 g/l added is a separate category, known as cachaça adoçada (sweet cachaça). Production can be split into two broad styles: industrial and artisanal.

Industrial cachaças are made by medium-sized and large mills mostly located in the countryside of the São Paulo and Ceará states. Industrial cachaça makers use column stills to process fermented sugarcane juice in a continuous distillation process. The product is then sold as a raw material to bottlers such as "51", "Velho Barreiro", "Tatuzinho", "Pitu", "21" and "Colonial", who adjust the cachaças to their standards by adding or removing components. Industrial cachaças are usually not aged.

Artisanal cachaças are produced by thousands of small mills spread all over the country, with the state of Minas Gerais generally respected as the best source. They are distilled in copper pot stills, and are then either bottled immediately or aged in wood barrels. The barrels can be made from a great variety of native or imported wood from trees such as chestnut, umburana, jequitibá, ipê, grápia, balsam wood, amendoim, angelim-araroba, louro, guanandi, brazilwood, cabreúva, tibiriçá, garapeira, cherry, and oak. Makers of artisanal cachaça usually bottle their own product and sell directly to the market (consumers, bars, restaurants, supermarkets etc.).

Cachaça aged in wood is known as cachaça envelhecida, and is split into ‘premium’ and ‘extra- premium’. To qualify as premium 50% of the cachaça must be aged at least one year in barrels no larger than 700l. Extra premium cachaças must be aged at least three years, though some are aged much longer.