The Senate Judiciary Committee voted 12 to 6 yesterday to recommend that the Senate confirm President Reagan's longtime adviser and friend Edwin Meese III as attorney general.

The expected Senate vote the week of Feb. 18 will end more than 13 months of uncertainty for Meese, who was nominated a year ago and cleared of legal violations by an independent counsel in September.

"Not only is Mr. Meese qualified to be attorney general, but he is a man of honesty, competency and dedication," committee Chairman Strom Thurmond (R-S.C.) said.

Democratic Sens. Dennis DeConcini (Ariz.) and Howell Heflin (Ala.) joined the 10 committee Republicans in voting to send Meese's nomination to the floor. "I have decided to give Mr. Meese the benefit of the doubt," said Heflin, saying he was voting for the nomination to allow the Senate to consider the matter.

Sen. Charles McC. Mathias Jr. (R-Md.), who was in the Soviet Union, cast a proxy vote for the nomination "to give the full Senate the opportunity" to vote on the nomination.

"I hope he understands the image problem he created for himself and keeps his commitment to this committee to become the best attorney general this committee has seen," DeConcini said. He said earlier that he did not want to stand in Meese's way because he thought the nominee was guilty only of "bad judgment."

The committee's senior Democrat, Sen. Joseph R. Biden Jr. (Del.), who had attacked Meese during the confirmation hearings as "beneath the office," voted no without comment.

"I just don't believe Mr. Meese understands the importance of public trust," Sen. Max Baucus (D-Mont.) said.

Senate Minority Leader Robert C. Byrd (D-W.Va.) said the "standard of excellence, not mediocrity, is the standard that has to be applied here. I'm sorry to say I don't believe the nominee meets these standards."

Sen. Edward M. Kennedy (Mass.) was the only Democrat who said he opposed Meese on philosophical grounds. "The degree of Mr. Meese's commitment to fair and impartial enforcement of laws is in question," Kennedy said. "Mr. Meese is associated with this administration's policies that undermine the principles of fairness and justice and with an administration which has hung out a sign saying, 'White men only.' "

Most Republicans voted yes without making speeches.

"I would be happy with the standards of Mr. Meese," Sen. Jeremiah Denton (R-Ala.) said. "I will vote for him."

Sen. Charles E. Grassley (R-Iowa) said he believed Meese's "long and distinguished law enforcement career" would help him in the fight against crime. "I am confident that Mr. Meese will go to great lengths to be a distinguished attorney general," Grassley added.

Thurmond, referring to the Democrats' charge that Meese's behavior as a public servant created the appearance of conflict of interest, said, "When the truth comes out, when the facts come out, perception or appearances must dissipate."

Meese, who was White House counselor, was first nominated to head the Justice Department last year. The nomination ran into trouble after disclosures about his financial affairs, including that he helped find government jobs for some people who had helped him financially.

An independent counsel was named at Meese's request and later reported that Meese had not violated the law. When President Reagan renominated Meese this year, he was expected to win easy approval, even though Sen. Howard M. Metzenbaum (D-Ohio) and other opponents such as Common Cause still contended he had ethical problems.

During three days of hearings before the Judiciary Committee last week, Meese said he did not behave unethically at any time in his career, although he said that he might do some things differently.

Two Democrats and two Republicans had voiced uncertainty until yesterday about which way they would vote. Of the four, Heflin and Mathias voted to send the nomination to the Senate, DeConcini voted yes, and Sen. Arlen Specter (R-Pa.) said yesterday that he decided to vote for confirmation partly because "on the most important issue, fighting violent crime in this country, Mr. Meese is uniquely qualified to be attorney general."

Later, during an interview, Specter said he conferred with Mathias and Sen. Orrin G. Hatch (R-Utah), who supported the nomination, before deciding. Specter said he was influenced by Meese's "determination and persistence," indicating "his own internal view of the propriety of what he did."

Specter said he also was influenced by Meese's support for grants for the study of juvenile justice -- although the Justice Department did not seek the grants in its budget -- and by Meese's statement during the hearings that he would support the use of summonses by the Immigration and Naturalization Service in cases in which arrest warrants are not necessary.

Specter said during the hearings that he was concerned about persons in Philadelphia who had been arrested by INS agents while working, when subpoenas would have been sufficient.