Cut good-quality unsalted butter into cubes. Heat butter in a heavy-duty saucepan over very low heat until it is melted. Let simmer gently until foam rises to the top of the melted butter. Continue cooking for about 8-10 minutes. During this time, the butter will go through several stages: it will foam, then bubble, then seem to almost stop bubbling and then foam again. It may splatter a bit, so be careful.
After the second time it foams, continue cooking until the bubbling subsides. At this point, the melted butter should be bright gold in color and there should be reddish brown pieces of milk solids at the bottom of the pan. Remove pan from heat.
Line a mesh strainer with butter muslin and set the strainer over a heatproof container. Carefully pour butter through the strainer into the container, leaving behind any solids from the bottom of the pan (these milk solids make a tasty snack with some bread).
Homemade ghee will keep for 3-6 months in the refrigerator, or 1-2 months at room temperature.