July 16 (Reuters) - PNC Financial reported an increase in second-quarter profit on Tuesday as higher fees from underwriting and advising on deals helped the bank offset a decline in interest income.

Lenders are seeing investment banking revenue recover after a dry spell that lasted roughly two years due to rising interest rates. Corporate clients are also re-evaluating deferred IPOs and large buyouts, boosting fees for underwriters and advisers.

Capital markets and advisory revenue at PNC climbed 28% to $272 million in the quarter, while asset management and brokerage revenue rose 5% to $364 million.

The company's net interest income (NII), or the difference between what a bank earns on loans and pays out on deposits, fell 6% to $3.30 billion.

Most U.S. banks are expecting a decline in NII this year as elevated interest rates have stymied loan activity, while efforts to retain customers from chasing better returns elsewhere have pushed up deposit costs.

PNC's net interest margin, a key measure of lending profitability, decreased 19 basis points to 2.60%.

Average loans in the quarter fell 1% to $319.9 billion, while average deposits declined 2% to $417.2 billion.

PNC forecast NII to be up between 1% and 2% in the third quarter, when compared with the second quarter.

The bank now expects full-year NII to fall 4%. It had earlier forecast a decline between 4% and 5% in 2024 interest income.

PNC's net income attributable to common shareholders rose to $1.36 billion, or $3.39 per share, for the three months ended June 30, compared with $1.35 billion, or $3.36 per share, a year earlier. (Reporting by Arasu Kannagi Basil and Manya Saini in Bengaluru; Editing by Shounak Dasgupta)