Read this and it gives detailed analysis about this fact, very interesting:
Lord Siva can grant Moksha as well as he cannot grant Moksha. I will reconcile it as follows:
1) Lord Shiva cannot give Moksha
In Harivamsa,Bhavishya parva,chapter 80,there is a incident of the pisacha named as Ghantakarna,who was the ardent devotee of Lord Shiva, to such a extent that he even was engaged in insulting Lord Vishnu. But Later on,he was able to understand the supremacy of Lord Vishnu,by the grace of Lord Shiva.Thus he was able to attain mukti,it is stated as follows:
aham kailasa nilayamasadya vrishabadhvajam
aradhya tam mahadevamastuvam satatam shivam ||3-80-28
“Ghantakarna said: Once upon a time,I went to the abode of Kailasa,where Lord Shiva resides.There I engaged myself regularly in glorifying Lord Siva and worshipping him.”
tatah prasanno mamaha vrinnishveti varam harah |
tato muktirmaya tatra prarthita devasannidhau ||3-80-29
“Being pleased with my worship,Lord Shiva became happy,and thereby he told me to ask for some benediction.I requested him to give me mukti(Liberation or moksha).”
muktim prarthayamanam mam punaraha trilochanah |
muktipradata sarvesam visnureva na samshayah ||3-80-30
“Seeing me asking for Mukti,Lord Siva said to me that the the giver of Mukti is only Lord Vishnu,of this there should not be any doubt.”
tasmadgatva ca badarim tatraradhya janardanam |
muktim prapnuhi govindannaranarayanashrame ||3-80-31
“Lord Shiva told me to go the Badari tirtha and staying in the hermitage of Nara-narayana sages, worship Lord Janardana.”
iti ukto devadevena shulina jnatavanaham |
tameva paramam matva govindam garudadvajam ||3-80-32
tasmat prathyamanah sanmuktim deshamamum gatah
“Being told by Lord Shiva in such a manner,I considered Lord Vishnu to be supreme and came here to stay in this place,to ask for the benediction of Mukti.”
The above incident is the part of the discussion between the Ghantakarna and Lord Krishna. And proves the fact that Lord Shiva cannot give Mukti to those,who don’t understand the fact that Lord Vishnu is supreme.The word “visnur eva na samsayah” is a emphatic statement used by Lord Siva to prove that only Lord Krishna can grant Moksha.(liberation) and no one else.
In Brihat Brahma samhita 3.9.68)one of the pancharatra samhita),Lord shiva says to Gautama muni as follows:
devo hi mat parah saksad paramatma sanatanah
narayano asti jagatam moksadah purusottamah
“ Lord Narayana is even superior to me and he alone can give moksha to everyone.”
In Brihat Brahma samhita 3.9.32,Lord Shiva further states:
na aham kaivalyado rajan paratantrah svabhavatah
svatantrah sarvabhuta atma paramatma ramapatih
“Oh King ,I,am not the giver of Moksha. By nature,I,am subservient to lord Vishnu. Whereas Lord Vishnu is completely independent and the atma (supersoul) of all the living entities.”
In the Skanda Purana, Lord Shiva tells Karttikeya:
shiva-shastreshu tad grahyam
paramo vishnur evaikas
taj jnanam moksha-sadhanam
shastranam nirnayas tv
eshas tad anyan mohanaya hi. iti.
“The statements of the Saiva scriptures should be accepted only when they agree with the Vaishnava scriptures. Lord Vishnu is the only Supreme Lord, and knowledge of Him is the path to liberation. That is the conclusion of all the scriptures. Any other conclusions are meant only to bewilder the people.” ( quoted by jiva goswami in parmatma sandarbha)
Similar verses are also quoted by Madhvacharya from Padma purana,uttara khanda 71.114 verse in mahabharata tataparya nirnaya 1.53. It is as follows:
paramo vishnur eva ekas tad jnanam moksa sadhanam |
shastranam nirnayas tu esha tad anyana mohanaya hi
“ The Lord Vishnu is the only one Supreme lord. And knowledge of Him leads to liberation. That is the conclusion of all the scriptures. Any other conclusions are meant only to bewilder the people.”
One need to also understand that Lord Vishnu is the controller of the mode of goodness.Hence the scriptures states that by worshipping the Lord Vishnu,one can easily attained the liberation. Kurma purana 1.21.32 states as follows:
sattvena mucyate jantuḥ sattvātmā bhagavān hariḥ
“By the mode of goodness, living entities are liberated. and Lord Hari is the embodiment of pure goodness.”
In Harivamsa 3.89.5,Lord Shiva states:
esha vo moksadata
“Lord Krishna is the giver of Moksha.”
Harivamsa 3.89.9 states:
harir ekah sada dhyeyo bhavadbhih sattvam sthitaih
na anyo jagati devo asti visnor narayanat parah |
“Lord Hari alone should always be mediated upon,since he alone is capable of freeing us from he ocean of material life,being the form of pure goodness.There are no other demigods who are superior to Lord Narayana.”
Srimad Bhagavatam 1.2.23 also states:
sattvaṁ rajas tama iti prakṛter guṇās tair
yuktaḥ paraḥ puruṣa eka ihāsya dhatte
sthity-ādaye hari-viriñci-hareti saṁjñāḥ
śreyāṁsi tatra khalu sattva-tanor nṛṇāṁ syuḥ
“The transcendental Lord is indirectly associated with the three modes of material nature, namely passion, goodness and ignorance, and just for the material world’s creation, maintenance and destruction He accepts the three qualitative forms of Brahma, Vishnu and Śiva. Of these three, all human beings can derive ultimate benefit (sreya) from Lord Vishnu, the form of the quality of goodness.
Note the usage of the word Sreya(utlimate good,that is Moksha) in the above verse means the opposite of preya(sense gratification),as explained in Katha upanishad.Thus one who is interested in liberation should worship Lord Vishnu alone.
Thus the above statements states that only Lord Krishna can give Moksha and not anyone else.Lord Krishna is the embodiment of pure goodness,hence he is the giver of Moksha to all of us.
2) The second part of the answer will now explain How lord Shiva can grant Moksha.
Once upon a time,Lord Shiva did severe penance for the period of one year,to worship Lord Vishnu.Then Lord Shiva obtained the vision of the Lord Vishnu and asked the boon to obtain the power to give mukti (liberation) to others.Thus Lord Shiva became Muktidata(giver of liberation or Moksha).This incident is mentioned in Padma Purana,uttara khanda,chapter 2.16 as follows:
Lord Shiva says as follows to Narada Muni:
tava prasadad devesa muktidata bhavamy aham
“By the mercy of Lord Vishnu,I became capable of giving Mukti to others.”
This incident is also mentioned in Skanda purana,Bhagavata Mahatmya,chapter 3.39–42. It is stated as follows:
“Lord Rudra said:
O lord of Devas,O my Lord, I have ample power in the case of the annihilation of Nitya(daily) ,Naimmitika(occasional) and prakrta(pertaining to prakriti)types.But I do not have any power in regard to Atyantika(ultimate) annihilation(liberation or Moksha). On account of this,I,am very unhappy,therefore ,I request you.
Sri Brihaspati said:
Lord Narayana then imparted Srimad Bhagavatam to Lord Rudra. By resorting to it,he conquered the tamas guna.
The story of Bhagavata was then read by Lord Shiva for a period of one year. Thereafter Lord Sadasiva obtained the power to manage the ultimate annihilation(atyantika)(Moksha) as well.”
Lord Shiva is known to be the greatest of the vaishnavas,thus he gives the knowledge of Lord Krishna to the devotees,and thereby people get Moksha. Narada Muni,pracetas(as described in srimad bhagavatam) and many other sages of the ancient past have considered Lord Shiva as the guru(spiritual master) and they learned the science of Bhagavata dharma from Lord Shiva.When Lord Shiva gets pleased with such devotee’s unflinching and unmotivated devotional service,Lord Krishna is also pleased.Just as the Guru is considered non-different from God,similarly Lord Shiva is considered nondifferent from Lord Krishna. In Narada pancaratra 2.5.9,Narada identifies the nondifference of Lord Siva and Lord Vishnu. But Lord Siva then immediately clarifies that this nondifference is on account of Lord Siva being a guru, and a disciple understand guru to be nondifferent from Lord Krishna.This nondifference is not on account of absolute identity of svarupa.
It is stated in Narada pancharatra 2.5.12–13 as follows:
Lord shiva says to Narada:
“A disciple (Narada,for whom Lord Siva is the guru) who is highly religious, intelligent, a good Brahmana, pure and born of a noble family considers his Guru equal to Lord Krsna.
And that vile wretch who considers any other Demigod equal to Krsna, is quite illiterate, and certainly commits the sin of Brahmahatya.”
(Thus the above verses explains this nondifference in proper perspective and simultaneously condemns equating any devata with Lord Krishna.)
Lord Siva being the giver of jnana and Lord Krishna being the giver of Moksha is explained as follows:
Skanda Purana states as follows:
isanat jnanam anvicchet
moksham icchet janardanat
“Seek Knowledge from Lord Siva and liberation from Lord Janardana.”
Lord Siva is the best of the vaishnavas and therefore,he is the best of yogis and best of the jnanis. This fact is stated in Narada Pancaratra 1.1.63 as follows:
vaisnavam ca siddhanam jnaninam yoginam sivaḥ
“Lord Siva is the best of vaishnava, best of yogi,best amongst the knowers of absolute truth and the best amongst all the siddhas.”
Many of the times,scriptures describe that Lord Siva gives Taraka Brahma mantra to those,who die in Varanasi.This Taraka Brahma mantra is known to be the names of Lord Rama.Thus by chanting the names of Lord Rama,Lord Siva becomes able to give Mukti to them.
Padma purana,svarga khanda,chapter 33.46,54 states:
yatra saksad mahadevo dehante svayam isvarah
vyacaste tarakam brahma tatra eva hi avimukteke
“Lord Siva ,who is the Isvara of all, gives the taraka brahma(rama nama) mantra to those who die in Varanasi.”
varanasyam mahadevat jnanam labdhva vimuchyate
“In Varanasi,those who obtain the jnana(knowledge of Lord Vishnu,taraka brahma) from Lord Mahadeva,they gets liberated.”
Finally I would like to conclude by quoting the statement of Narada Pancaratra 1.2.7,46,47 as follows:
vraja vraja dvija śīghraṃ śaṅkaraṃ jñāna-sindhum /
labha labha hari-bhaktiṃ vaiṣṇavoktāṃ supakvāṃ /
bhava-nigaḍa-nibandha-chedinīṃ kartanīṃ ca //
“Cease, Cease,О Brahmana,go fast to Lord Sankara, the ocean of knowledge and obtain the Hari bhakti (devotion to lord Hari) from him, as spoken by Vaisnavas, that will severe like an axe to the hard bonds of Samsara.”
śaṅkaraś ca guruṃ kṛtvā hari-bhaktiṃ labhāciram //
supakvā hari-bhaktiś ca taraṇī bhava-tāraṇe /
gurur eva paraṃ brahma karṇa-dhāra-svarūpakaḥ //
” Go and adopt Lord Sankara as your Guru and obtain Hari bhakti from him. By attaining Hari bhakti,one will cross over this samsara. Guru is parabrahma,and he acts like the helmsman to cross this ocean of samsara.”
Thus the above two verses from the Narada Pancharatra asks all the devotees to obtain the Hari Bhakti from Lord Siva,who acts as the guru for all the vaishnavas.
Thus to summarise:
1)Lord Krishna being independent , alone can give Moksha directly to his devotees.
2)Lord Siva is able to give Mukti to some of the devotees,on account of the mercy of Lord Krishna,not on his own.
3)Lord Siva is considered as best of the vaishnava, and therefore he act as the Guru of all of us.Guru being nondifferent from Krishna,Lord Siva is considered as nondifferent from Lord Krishna.
4)One should take the Hari Bhakti from Lord Siva,and thereby attain liberation.