Always fun to puzzle over.
The Civil War Data website lists no confederates of that name, and only 2 Union men, both from Pennsylvania, and your musket was made in Pennsylvania.
One was D H McLean who mustered in for only a couple weeks in 1862 and became a commissioned officer. He would not have had a musket, and would not hae broken rules to carve on it. The other was Daniel McLean who is described as follows on that website:
Residence was not listed;
Enlisted on 8/29/1864 as a Private.
On 8/29/1864 he mustered into "B" Co. PA 203rd Infantry
He was Mustered Out on 6/22/1865 at Raleigh, NC
Of course, it could also have been carved on there by Durwood McLean in 1902 on a gun he found in grandfather's attic, or some other McLean some other year.
And that's leaving aside the possibility that there was another soldier who spelled his name MacClean, or M'Lean or McLeen or some other variation, or that one of the other 59 McLeans in the Union army had a first name that did not begin with D but used a middle name that did begin with D.
You can see the diffculties, eh?
But Daniel McLean who joined in 1864 and served to the end from Pennsylvania is a likely candidate.
Wow. Thanks for the insight and hard work. Daniel McLean is certainly possible. Co. H. 8th NC regiment organized August 1861 on the Grounds of the current home of the weapon, the Eastern Cabarrus Historical Society (Mt. Pleasant, NC). Company H went through Raleigh at the end of the war. Maybe that is the connection.