In some English dialects "-ing" is replaced by "-in" (e.g., "taking" to "talkin'"). "ng" ([ŋ]), the velar nasal consonant, is done at the back of the mouth, but "n" ([n]), the alveolar nasal consonant, is done at the front of the mouth. Why would whatever linguistic shift that happened move the sound from the back of the mouth to the front, rather than keeping the new sound also at the back of the mouth?
Sorry, this is going to be a bit rambling. TL;DR: As far as I can tell, nobody really knows.
As Peter Shor mentions, the present participle suffix in English originally did not include velar [ŋg], but a coronal [nd] (it was something like -ind). A suffix -ing with a velar consonant did exist, but it was used for forming verbal nouns. (Actually, -ing was itself a merger of an older suffix -ing that appeared on some grammatically masculine nouns, and a suffix -ung that created grammatically feminine verbal nouns.) You can see the difference in the modern German language, where the cognate to the noun (the) warning is (die) Warnung while the cognate to the participle warning is warnend.
For some unclear reason, these suffixes are conflated in the modern English writing system as -ing. The history of their conflation in pronunciation also seems unclear.
I found a Languagehat blog post on this topic ("Dropping the G") and it pointed to a dissertation by Ann Celeste Houston, "Continuity and Change in English Morphology: The Variable (ING)" (1985), that I am currently reading. Houston says the following about the change in spelling from "-ind" to "-ing" in participle forms:
a clear account of the mechanisms of this change is lacking. Views range from postulating a shift from [n] to [ŋ], as well as from [ŋ] to [n], and there is not a consensus as to whether the final stops were present at the time of the replacement of <ind> with <ing>.” (36)
On page 3 Houston mentions that Henry C. Wyld (1936) says the variation between /n/ and /ŋ/ is due to non-phonetically motivated change of /n/ to /ŋ/ in some words due to the influence of the spelling -ing. So basically, spelling pronunciation. Although this is probably part of the answer, Wylde's explanation seems incomplete and therefore unsatisfactory to me for the following reasons:
- It doesn't explain why the spelling “-ing” ever become standard in the first place
- it doesn't explain why some speakers use /n/ in words that etymologically had /ŋ/, such as the nouns “something” or “building”
- It seems like it can't explain why we see realizations such as /θiŋkin/ (“theenkeen”) where the vowel shows the effects of a sound change (i-tensing) that occurs before /ŋ/ only, not before /n/, but the consonant is realized [n].
I hope I will learn more of the explanation as I finish reading Houston's dissertation. (If anyone else reads it and finds out more before I update this, please feel free to post a separate answer.)
Also, on page 16, Houston says it is not a sound change currently in progress: rather, it is a stable state of variation conditioned by social effects.
I don't think it explains much to appeal to the idea of "effort". For one thing, I don’t know how we would quantify “effort”. I’m not an expert on phonology or phonetics, but cross-linguistically, there doesn't seem to be much evidence that it is more difficult to pronounce coda [ŋ] than it is to pronounce coda [n]. In fact, a fairly common, and apparently phonetically motivated, sound change is the velarization of all coda nasals, including /n/, to [ŋ]. (See "Vocalic Dorsality in Revised Articulator Theory" (2004) by Darin Howe for some examples.) This makes me doubt that [n] is generally “easier” to pronounce in this position.
Phonologically, I know some people have argued that [ŋ] in English is not a phoneme, but only occurs as an allophone of /n/ before velars, or of /ng/ in certain morpho-phonological environments where [g] is deleted. If this is the case, we might say that word-final [n] in English is structurally simpler than [ŋ], since the former corresponds to one segment while the latter corresponds to two segments (/n/ followed by /g/). And this structural simplicity might cause it to be preferred. I don’t know if this is a sensible argument to make, though.
It's may be the linguistic shift [ŋ] → [n] didn't happen the way you're thinking about it.
In Early Middle English, the participle ended with -inge and the gerund ended with -ende or -inde. In the standard dialect, these merged to form -ing. But it's possible that in some dialects, they merged to become -in'. The influence of these dialects on others might have led to the widespread use of -in' today. See Wikipedia.
The OED says the difference was maintained in Northern England and Scotland well after they merged in Southern England, and that in parts of this area, they are still distinct today (although they're pronounced -in' [ɪn] and -an' [æn]; it's the vowel that is different).