It is a nonselective inhibitor of cyclooxygenase (COX) 1 and 2, the enzymes that participate in prostaglandin synthesis from arachidonic acid. Prostaglandins are hormone-like molecules normally found in the body, where they have a wide variety of effects, some of which lead to pain, fever, and inflammation. By inhibiting the synthesis of prostaglandins, indometacin can reduce pain, fever, and inflammation. Indometacin mechanism of action, along with several other NSAIDs that inhibit COX, was described in 1971.Additionally, indometacin has recently been found to be a positive allosteric modulator (PAM) of the CB1 cannabinoid receptor. By enhancing the binding and signalling of endogenous cannabinoids such as anandamide, PAMs may elicit increased cannabinergic signalling in a tissue specific manner, reducing the incidence of problematic side effects such as psychoactivity while maintaining some antinociceptive activity.Besides, indometacin has logarithmic acid dissociation constant  pKa of 3 to 4.5. Since the physiologic body pH is well above the pKa range of indometacin, most of the indometacin molecules will be dissociated into ionized form, leaving very little un-ionized form of indometacin to cross a cell membrane. If the pH gradient across a cell membrane is high, most of the  indometacin molecules will be trapped in one side of the membrane with higher pH. This phenomenon is called "ion trapping". The phenomenon of ion trapping is particularly prominent in the stomach as pH at the stomach mucosa layer is extremely acidic, while the parietal cells are more alkaline.
Nearly all patients benefit from an ulcer protective drug (e.g. highly dosed antacids, ranitidine 150 mg at bedtime, or omeprazole 20 mg at bedtime). Other common gastrointestinal complaints, including dyspepsia, heartburn and mild diarrhea are less serious and rarely require discontinuation of indometacin. Many NSAIDs, but particularly indometacin, cause lithium retention by reducing its excretion by the kidneys. Thus indometacin users have an elevated risk of lithium toxicity. For patients taking lithium (e.g. for treatment of depression or bipolar disorder), less toxic NSAIDs such as sulindac or aspirin are preferred. All NSAIDs, including indometacin, also increase plasma renin activity and aldosterone levels, and increase sodium and potassium retention. Vasopressin activity is also enhanced. Together these may lead to:

Edema (swelling due to fluid retention)
Hyperkalemia (high potassium levels)
Hypernatremia (high sodium levels)
HypertensionElevations of serum creatinine and more serious renal damage such as acute kidney failure, chronic nephritis and nephrotic syndrome, are also possible. These conditions also often begin with edema and high potassium levels in the blood. Paradoxically yet uncommonly, indometacin can cause headache (10 to 20%), sometimes with vertigo and dizziness, hearing loss, tinnitus, blurred vision (with or without retinal damage). There are unsubstantiated reports of worsening Parkinsons disease, epilepsy, and psychiatric disorders. Cases of life-threatening shock (including angioedema, sweating, severe hypotension and tachycardia as well as acute bronchospasm), severe or lethal hepatitis and severe bone marrow damage have all been reported. Skin reactions and photosensitivity are also possible side effects.