WASHINGTON (AP) _ The AFL-CIO is enlisting perhaps the world's most popular union leader, Lech Walesa, for an advertising campaign and is banking heavily that the Polish Solidarity leader's fame will help improve the image of U.S. unions.

Walesa, wearing a ''Union Yes'' pin on his lapel, taped a 30-second spot earlier this week when he appeared at the labor federation's convention.

It took about 90 minutes to tape the spot because Walesa speaks little English and the producers were not certain until Wednesday that they would be able to cut a commercial from the tape.

Most of his remarks are in Polish and translated by an interpreter into English. But the ad ends with the onetime shipyard electrician beaming and declaring the ''Union Yes'' slogan of the federation's advertising campaign.

The ad will air for the first time Tuesday night during ABC-TV's situation comedy, ''Roseanne.'' The first planned run will end the following Saturday with an airing during the Notre Dame-Miami college football game.

In that five-day period, the federation will spend $600,000 to air the ad during those two nationally televised programs as well as during dozens of local newscasts in major cities.

The ''Union Yes'' campaign to date has relied on four actors and actresses: Jack Lemmon, Tyne Daly, Howard Hesseman and Edward James Olmos, who taped ads in both English and Spanish in an effort to attract Hispanics.