In the usual context of these words, as others have pointed out, one invariably says 'according to the law'.
However, you can use 'according the law', just not in the context you're referring to.
To illustrate: In areas of open lawlessness, according the law the respect it deserves can be difficult, if not impossible to achieve.
This obviously uses 'according' as a verb, not a preposition as in the example sentences.
I mention this usage as I don't think "No, according
the law is completely incorrect," or
"Only “according to the law” is correct" are entirely correct.
Kevin notes: This usage is dated and seldom used anymore.
ell.stackexchange.com/users/89/mcalex
When an average person hears the words according and law , the first thing that probably comes to their mind is the expression according to the law .
So, no, according the law is incorrect.
You should always say according to the law .
according to something is actually a set phrase in English and you just can't leave the to out from it.
It's part of the expression and therefore it must be there.
Nor can you say according of the law .
Again, that's just incorrect grammar.
However, according the law would still be grammatically correct, but it would mean a completely different thing.
In this case, according is the present participle of the verb to accord which means to give or grant something to someone.
For example: Accord the law the necessary status in society is a task of the highest priority if we are to build a fair and just legal system.
ell.stackexchange.com/users/6450/Michael Rybkin
" According to " is a set phrase in English to indicate where something is specified.
You can't just drop the "to" and expect it to have the same meaning.
The verb to accord has a number of meanings; the only sense in which it could abut a noun phrase like that is as a transitive verb; example: "
I was according the law the respect it deserves".
That's unlikely to be the sense intended here.
ell.stackexchange.com/users/44500/Toby Speight
“According the law” is ungrammatical.
Only “according to the law” is correct.
ell.stackexchange.com/users/63007/mamster
"According to" is certainly far more common in current usage.
I cannot imagine dropping the "to" except perhaps in some unusual, perhaps archaic, construction.
OED lists according as an adverb and notes that it's "usually" according to .
They also list a second sense as according as .
M-W and Macmillan list
according to as a preposition.
ell.stackexchange.com/users/15607/Adrian McCarthy
Is it grammatical to say "according to the law" instead of "according the law"?  If so, is there any difference in meaning?
Is it grammatical to say "according to the law" instead of "according the law"?
ell.stackexchange.com
<meaning><prepositions>
ell.stackexchange.com/questions/147328
ell.stackexchange.com/users/1508/Anixx
Without to "to", the sentence does nto have the same meaning. One may say "I was according the law the respect it deserves". However, this is unlikely to be the sense intended here. Therefore, only “according to the law” is correct. Only according to law is correct.
“According the law” is ungrammatical. Only according to law is correct.