The company's leadership has come under pressure from activist investor from David Tepper for management changes. Shareholders have been calling for Allergan to split or sell the company.

Allergan, the maker of Botox and blockbuster eye treatment Restatis, isn't the same industry leader it once was. The stock has lost about half its value since 2017. The drugmaker has struggled ever since its planned $160 billion mega deal with Pfizer fell through in 2016 after pushback from the Obama administration, analysts say. The pharmaceutical company has also been hit with drug trial setbacks and generic competition.

At the time, Allergan was selling its generic drug business to Israel drugmaker Teva Pharmaceutical for $40.5 billion. The cash and stock deal, announced in July 2015, was seen by investors as a positive for the Ireland-based pharmaceutical company. It freed Allergan to focus on more bankable brand-name drugs, while also providing it with more cash to pay down debt. Allergan is "trying to move higher up into the food chain, so they'll probably go after a branded drug company," Cooperman, the Omega Advisors chairman and CEO, told CNBC in an interview on July 28, 2015 . "Maybe AbbVie."

"Investors have been frustrated," said RBC Capital Markets analyst Randall Stanicky, who has been calling for a break up Allergan since 2017. He said a combination of drug trial setbacks, disappointments with capital deployment, strategic missteps and the company's inability to grow earnings has pressured the stock.

Now, Allergan's fortunes may change. AbbVie announced Tuesday it would buy Allergan for about $63 billion, a 45% premium over Allergan's closing share price of $129.57 on Monday. According to the deal, Allergan shareholders will receive 0.866 AbbiVie share and $120.30 in cash for each Allergan share for a total value of $188.24 a share. If approved, the deal would combine two struggling companies seeking growth.

Stanicky said the deal is a "nice exit from a tough situation" for Allergan. "I think investors should be happy with this exit," he added.

Allergan investors cheered the deal Tuesday. Shares of Allergan surged 25.4% on Tuesday while AbbVie shares fell 16.3%.

AbbVie has been looking to diversify its portfolio as blockbuster arthritis treatment Humira faces competition from cheaper versions in Europe and faces expiration of its patents in the U.S. in 2023. Allergan's aesthetics products and eye care and other medicines could help AbbVie shore up revenue.

David Maris, a research analyst at Wells Fargo who covers Allergan, told CNBC's "Power Lunch" on Tuesday that he isn't convinced that the deal is a better long-term alternative for Allergan shareholders looking past Humira's patent expiration. But in a follow-up phone interview, Maris added that the stock had been underpeforming for so long, the board had to do something.

The deal is a "little disappointing," Maris said." "I can see why AbbVie wants to diversify away from Humira. I don't know why an Allergan shareholder would want to diversify into Humaria."

Jefferies health-care desk analyst Jared Holz said AbbVie's stock decline is a "bit overdone," saying this solves a growth problem for each company. "I feel like I'm the only person in the world who feels this deal isn't a disaster," he said. "It is a homerun for Allergan shareholders."