As a programmer I have always assumed that using != as meaning not equal to when writing text (usually on the internet) came from programming languages. Is this true or is the origin different?
Yes, this is from programming languages such as C and C++.
The symbol used to denote inequation — when items are not equal — is a slashed equals sign "≠" (Unicode 2260).
Most programming languages, limiting themselves to the ASCII character set, use ~=, !=, /=, =/=, or <> to represent their boolean inequality operator.
(Edit: Combining vincente and Mark Hurd's comment with something extra.)
And some languages (including B and C) use
! for logical negation (aka NOT), so
!= is slightly more natural than
> and the other ASCII-only operators. Again, BCPL is different: it uses
~a to mean "NOT a", but uses
a!b for !(a+b).