Methyldopa acts as a centrally acting alpha-2 adrenergic agonist. It is converted into alpha-methyl norepinephrine in the body, which stimulates receptors in the brain that reduce sympathetic nervous system activity, leading to decreased blood pressure.