The rating for Delaware's general obligation bonds was raised Thursday from BAA 1, the lowest for states, to A by Moody's Investors Service Inc., following a 1 1/2-year long campaign by state officials to improve Delaware's financial image.

The announcement came just one week before the state was due to sell $50 million in bonds. Of the offering, $38 million will be 20-year bonds and $12 million will be 10-year bonds.

Gov. Pierre S. du Pont IV, traveling in California, said Moody's had noted the elimination of past budget deficits and attaining a balanced budget for fiscal year as factors in raising the rating.

It was on March 3, 1977, that du Pont declared Delaware had a huge budget deficit - more than a total of $121 million for fiscal 1977 and fiscal 1978 - and was "bankrupt," setting off shock waves among investors.

Weston E. Nellius, state finance secretary, said Moody's action was significant although Standard & Poor's Corp. had held the state's rating at A-plus on Wednesday.

Secretary of State Glenn C. Kenton said that the A rating could mean five to 10 basis points - .05 to .1 percentage point - on the interest rate for bonds sold next week, which could mean a savings of about $200,000 to $400,000 over the life of the bonds.